예제 #1
0
 private HadoopConnection getConnectionForCluster(HadoopCluster cluster) {
   HadoopConnection result = _connections.get(cluster.getClusterName());
   if (result == null) {
     /* TODO: SshUtils could be a single shared thread-safe object or non threadsafe object per connection */
     result = new HadoopConnection(cluster, _connectionProperties, new NonThreadSafeSshUtils());
     result.setHadoopCredentials(_credentials);
     result.setHadoopExcludeTTPath(_jtConfig.getExcludeTTPath());
     result.setHadoopHomePath(_jtConfig.getHadoopHomePath());
     _connections.put(cluster.getClusterName(), result);
   }
   setErrorParamValue(ParamTypes.HADOOP_HOME, result.getHadoopHome());
   setErrorParamValue(ParamTypes.JOBTRACKER, result.getJobTrackerName());
   setErrorParamValue(ParamTypes.EXCLUDE_FILE, result.getExcludeFilePath());
   return result;
 }