Browse Source

Merge remote branch 'vinithra-github/HUE-219-plus-beeswax' into HUE-219

Conflicts:
	apps/beeswax/java/gen-java/com/cloudera/beeswax/api/BeeswaxService.java
	apps/beeswax/java/gen-java/com/cloudera/beeswax/api/Query.java
	apps/beeswax/java/gen-java/com/cloudera/beeswax/api/Results.java
	apps/beeswax/java/src/com/cloudera/beeswax/BeeswaxServiceImpl.java
	apps/beeswax/regenerate_thrift.sh
	desktop/core/src/desktop/conf.py
	desktop/core/src/desktop/lib/thrift_sasl.py
	desktop/core/src/desktop/lib/thrift_util.py
	desktop/libs/hadoop/gen-py/hadoop/api/common/ttypes.py
	desktop/libs/hadoop/gen-py/hadoop/api/hdfs/Namenode-remote
	desktop/libs/hadoop/gen-py/hadoop/api/hdfs/Namenode.py
	desktop/libs/hadoop/gen-py/hadoop/api/jobtracker/Jobtracker-remote
	desktop/libs/hadoop/gen-py/hadoop/api/jobtracker/Jobtracker.py
	desktop/libs/hadoop/java/gen-java/org/apache/hadoop/thriftfs/api/Namenode.java
	desktop/libs/hadoop/java/gen-java/org/apache/hadoop/thriftfs/jobtracker/api/Jobtracker.java
	desktop/libs/hadoop/java/src/java/org/apache/hadoop/thriftfs/HadoopThriftAuthBridge.java
	desktop/libs/hadoop/java/src/java/org/apache/hadoop/thriftfs/ThriftUtils.java
	desktop/libs/hadoop/src/hadoop/conf.py
	desktop/libs/hadoop/src/hadoop/job_tracker.py
	ext/thirdparty/js/manifest.json
Aaron T. Myers 15 years ago
parent
commit
8a34347313
33 changed files with 215 additions and 296 deletions
  1. 3 3
      Makefile
  2. 1 1
      apps/Makefile
  3. 1 1
      apps/beeswax/beeswax_server.sh
  4. 7 7
      apps/beeswax/gen-py/beeswaxd/BeeswaxService.py
  5. 15 35
      apps/beeswax/gen-py/beeswaxd/ttypes.py
  6. BIN
      apps/beeswax/hive/lib/commons-cli-1.2.jar
  7. BIN
      apps/beeswax/hive/lib/commons-codec-1.4.jar
  8. BIN
      apps/beeswax/hive/lib/hive-cli-0.5.0.jar
  9. BIN
      apps/beeswax/hive/lib/hive-common-0.5.0.jar
  10. BIN
      apps/beeswax/hive/lib/hive-default-xml-0.5.0.jar
  11. BIN
      apps/beeswax/hive/lib/hive-exec-0.5.0.jar
  12. BIN
      apps/beeswax/hive/lib/hive-jdbc-0.5.0.jar
  13. BIN
      apps/beeswax/hive/lib/hive-metastore-0.5.0.jar
  14. BIN
      apps/beeswax/hive/lib/hive-serde-0.5.0.jar
  15. BIN
      apps/beeswax/hive/lib/hive-service-0.5.0.jar
  16. BIN
      apps/beeswax/hive/lib/hive-shims-0.5.0.jar
  17. BIN
      apps/beeswax/hive/lib/hive_contrib.jar
  18. BIN
      apps/beeswax/hive/lib/junit-4.5.jar
  19. BIN
      apps/beeswax/hive/lib/slf4j-api-1.6.1.jar
  20. BIN
      apps/beeswax/hive/lib/slf4j-log4j12-1.6.1.jar
  21. 9 9
      apps/beeswax/java/gen-java/com/cloudera/beeswax/api/BeeswaxService.java
  22. 4 135
      apps/beeswax/java/gen-java/com/cloudera/beeswax/api/Query.java
  23. 16 16
      apps/beeswax/java/gen-java/com/cloudera/beeswax/api/Results.java
  24. 117 55
      apps/beeswax/java/src/com/cloudera/beeswax/BeeswaxServiceImpl.java
  25. 4 2
      apps/beeswax/java/src/com/cloudera/beeswax/Server.java
  26. 0 2
      apps/beeswax/src/beeswax/management/commands/beeswax_install_examples.py
  27. 2 1
      apps/beeswax/src/beeswax/management/commands/beeswax_server.py
  28. 6 1
      apps/beeswax/src/beeswax/tests.py
  29. 2 3
      apps/beeswax/src/beeswax/views.py
  30. 0 1
      apps/beeswax/thrift/beeswax.thrift
  31. 16 17
      desktop/libs/hadoop/java/src/java/org/apache/hadoop/thriftfs/HadoopThriftAuthBridge.java
  32. 4 2
      desktop/libs/hadoop/src/hadoop/conf.py
  33. 8 5
      desktop/libs/hadoop/src/hadoop/mini_cluster.py

+ 3 - 3
Makefile

@@ -131,9 +131,9 @@ docs:
 
 .PHONY: crepo
 crepo: $(THIRDPARTY_JS_DIR)/manifest.json $(THIRDPARTY_JS_DIR)/*.hash
-	@echo "--- Synchronizing external dependencies with crepo"
-	@mkdir -p $(BLD_DIR)
-	@cd $(THIRDPARTY_JS_DIR) && $(CREPO) sync && \
+#	@echo "--- Synchronizing external dependencies with crepo"
+#	@mkdir -p $(BLD_DIR)
+#	@cd $(THIRDPARTY_JS_DIR) && $(CREPO) sync && \
 	  ($(CREPO) dump-refs > $(ROOT)/VERSION_DATA || true)
 # END DEV ONLY >>>>
 

+ 1 - 1
apps/Makefile

@@ -31,10 +31,10 @@ default: env-install
 .PHONY: clean default distclean install
 
 APPS := about \
+	beeswax \
 	filebrowser \
 	help \
 	jobbrowser \
-	jobsub \
 	proxy \
 	useradmin
 

+ 1 - 1
apps/beeswax/beeswax_server.sh

@@ -36,7 +36,7 @@ BEESWAX_HIVE_LIB=$BEESWAX_ROOT/hive/lib
 
 echo \$HADOOP_HOME=$HADOOP_HOME
 
-export HADOOP_CLASSPATH=$(find $BEESWAX_HIVE_LIB -name "*.jar" | tr "\n" :):$HIVE_CONF_DIR
+export HADOOP_CLASSPATH=$(find $BEESWAX_HIVE_LIB -name "*.jar" | tr "\n" :):$HIVE_CONF_DIR:$BEESWAX_ROOT/../../desktop/libs/hadoop/static-group-mapping/java-lib/static-group-mapping-1.0.jar
 echo \$HADOOP_CLASSPATH=$HADOOP_CLASSPATH
 
 # Use HADOOP_CONF_DIR to preprend to classpath, to avoid fb303 conflict,

+ 7 - 7
apps/beeswax/gen-py/beeswaxd/BeeswaxService.py

@@ -1669,11 +1669,11 @@ class get_default_configuration_result(object):
       if fid == 0:
         if ftype == TType.LIST:
           self.success = []
-          (_etype31, _size28) = iprot.readListBegin()
-          for _i32 in xrange(_size28):
-            _elem33 = ConfigVariable()
-            _elem33.read(iprot)
-            self.success.append(_elem33)
+          (_etype24, _size21) = iprot.readListBegin()
+          for _i25 in xrange(_size21):
+            _elem26 = ConfigVariable()
+            _elem26.read(iprot)
+            self.success.append(_elem26)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -1690,8 +1690,8 @@ class get_default_configuration_result(object):
     if self.success != None:
       oprot.writeFieldBegin('success', TType.LIST, 0)
       oprot.writeListBegin(TType.STRUCT, len(self.success))
-      for iter34 in self.success:
-        iter34.write(oprot)
+      for iter27 in self.success:
+        iter27.write(oprot)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     oprot.writeFieldStop()

+ 15 - 35
apps/beeswax/gen-py/beeswaxd/ttypes.py

@@ -49,7 +49,6 @@ class Query(object):
    - query
    - configuration
    - hadoop_user
-   - hadoop_groups
   """
 
   thrift_spec = (
@@ -58,14 +57,12 @@ class Query(object):
     None, # 2
     (3, TType.LIST, 'configuration', (TType.STRING,None), None, ), # 3
     (4, TType.STRING, 'hadoop_user', None, None, ), # 4
-    (5, TType.LIST, 'hadoop_groups', (TType.STRING,None), None, ), # 5
   )
 
-  def __init__(self, query=None, configuration=None, hadoop_user=None, hadoop_groups=None,):
+  def __init__(self, query=None, configuration=None, hadoop_user=None,):
     self.query = query
     self.configuration = configuration
     self.hadoop_user = hadoop_user
-    self.hadoop_groups = hadoop_groups
 
   def read(self, iprot):
     if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
@@ -96,16 +93,6 @@ class Query(object):
           self.hadoop_user = iprot.readString();
         else:
           iprot.skip(ftype)
-      elif fid == 5:
-        if ftype == TType.LIST:
-          self.hadoop_groups = []
-          (_etype9, _size6) = iprot.readListBegin()
-          for _i10 in xrange(_size6):
-            _elem11 = iprot.readString();
-            self.hadoop_groups.append(_elem11)
-          iprot.readListEnd()
-        else:
-          iprot.skip(ftype)
       else:
         iprot.skip(ftype)
       iprot.readFieldEnd()
@@ -123,21 +110,14 @@ class Query(object):
     if self.configuration != None:
       oprot.writeFieldBegin('configuration', TType.LIST, 3)
       oprot.writeListBegin(TType.STRING, len(self.configuration))
-      for iter12 in self.configuration:
-        oprot.writeString(iter12)
+      for iter6 in self.configuration:
+        oprot.writeString(iter6)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     if self.hadoop_user != None:
       oprot.writeFieldBegin('hadoop_user', TType.STRING, 4)
       oprot.writeString(self.hadoop_user)
       oprot.writeFieldEnd()
-    if self.hadoop_groups != None:
-      oprot.writeFieldBegin('hadoop_groups', TType.LIST, 5)
-      oprot.writeListBegin(TType.STRING, len(self.hadoop_groups))
-      for iter13 in self.hadoop_groups:
-        oprot.writeString(iter13)
-      oprot.writeListEnd()
-      oprot.writeFieldEnd()
     oprot.writeFieldStop()
     oprot.writeStructEnd()
     def validate(self):
@@ -328,20 +308,20 @@ class Results(object):
       elif fid == 2:
         if ftype == TType.LIST:
           self.columns = []
-          (_etype17, _size14) = iprot.readListBegin()
-          for _i18 in xrange(_size14):
-            _elem19 = iprot.readString();
-            self.columns.append(_elem19)
+          (_etype10, _size7) = iprot.readListBegin()
+          for _i11 in xrange(_size7):
+            _elem12 = iprot.readString();
+            self.columns.append(_elem12)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
       elif fid == 3:
         if ftype == TType.LIST:
           self.data = []
-          (_etype23, _size20) = iprot.readListBegin()
-          for _i24 in xrange(_size20):
-            _elem25 = iprot.readString();
-            self.data.append(_elem25)
+          (_etype16, _size13) = iprot.readListBegin()
+          for _i17 in xrange(_size13):
+            _elem18 = iprot.readString();
+            self.data.append(_elem18)
           iprot.readListEnd()
         else:
           iprot.skip(ftype)
@@ -372,15 +352,15 @@ class Results(object):
     if self.columns != None:
       oprot.writeFieldBegin('columns', TType.LIST, 2)
       oprot.writeListBegin(TType.STRING, len(self.columns))
-      for iter26 in self.columns:
-        oprot.writeString(iter26)
+      for iter19 in self.columns:
+        oprot.writeString(iter19)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     if self.data != None:
       oprot.writeFieldBegin('data', TType.LIST, 3)
       oprot.writeListBegin(TType.STRING, len(self.data))
-      for iter27 in self.data:
-        oprot.writeString(iter27)
+      for iter20 in self.data:
+        oprot.writeString(iter20)
       oprot.writeListEnd()
       oprot.writeFieldEnd()
     if self.start_row != None:

BIN
apps/beeswax/hive/lib/commons-cli-1.2.jar


BIN
apps/beeswax/hive/lib/commons-codec-1.4.jar


BIN
apps/beeswax/hive/lib/hive-cli-0.5.0.jar


BIN
apps/beeswax/hive/lib/hive-common-0.5.0.jar


BIN
apps/beeswax/hive/lib/hive-default-xml-0.5.0.jar


BIN
apps/beeswax/hive/lib/hive-exec-0.5.0.jar


BIN
apps/beeswax/hive/lib/hive-jdbc-0.5.0.jar


BIN
apps/beeswax/hive/lib/hive-metastore-0.5.0.jar


BIN
apps/beeswax/hive/lib/hive-serde-0.5.0.jar


BIN
apps/beeswax/hive/lib/hive-service-0.5.0.jar


BIN
apps/beeswax/hive/lib/hive-shims-0.5.0.jar


BIN
apps/beeswax/hive/lib/hive_contrib.jar


BIN
apps/beeswax/hive/lib/junit-4.5.jar


BIN
apps/beeswax/hive/lib/slf4j-api-1.6.1.jar


BIN
apps/beeswax/hive/lib/slf4j-log4j12-1.6.1.jar


+ 9 - 9
apps/beeswax/java/gen-java/com/cloudera/beeswax/api/BeeswaxService.java

@@ -6965,14 +6965,14 @@ public class BeeswaxService {
           case 0: // SUCCESS
             if (field.type == TType.LIST) {
               {
-                TList _list16 = iprot.readListBegin();
-                this.success = new ArrayList<ConfigVariable>(_list16.size);
-                for (int _i17 = 0; _i17 < _list16.size; ++_i17)
+                TList _list12 = iprot.readListBegin();
+                this.success = new ArrayList<ConfigVariable>(_list12.size);
+                for (int _i13 = 0; _i13 < _list12.size; ++_i13)
                 {
-                  ConfigVariable _elem18;
-                  _elem18 = new ConfigVariable();
-                  _elem18.read(iprot);
-                  this.success.add(_elem18);
+                  ConfigVariable _elem14;
+                  _elem14 = new ConfigVariable();
+                  _elem14.read(iprot);
+                  this.success.add(_elem14);
                 }
                 iprot.readListEnd();
               }
@@ -6998,9 +6998,9 @@ public class BeeswaxService {
         oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
         {
           oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
-          for (ConfigVariable _iter19 : this.success)
+          for (ConfigVariable _iter15 : this.success)
           {
-            _iter19.write(oprot);
+            _iter15.write(oprot);
           }
           oprot.writeListEnd();
         }

+ 4 - 135
apps/beeswax/java/gen-java/com/cloudera/beeswax/api/Query.java

@@ -33,19 +33,16 @@ public class Query implements TBase<Query, Query._Fields>, java.io.Serializable,
   private static final TField QUERY_FIELD_DESC = new TField("query", TType.STRING, (short)1);
   private static final TField CONFIGURATION_FIELD_DESC = new TField("configuration", TType.LIST, (short)3);
   private static final TField HADOOP_USER_FIELD_DESC = new TField("hadoop_user", TType.STRING, (short)4);
-  private static final TField HADOOP_GROUPS_FIELD_DESC = new TField("hadoop_groups", TType.LIST, (short)5);
 
   public String query;
   public List<String> configuration;
   public String hadoop_user;
-  public List<String> hadoop_groups;
 
   /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
   public enum _Fields implements TFieldIdEnum {
     QUERY((short)1, "query"),
     CONFIGURATION((short)3, "configuration"),
-    HADOOP_USER((short)4, "hadoop_user"),
-    HADOOP_GROUPS((short)5, "hadoop_groups");
+    HADOOP_USER((short)4, "hadoop_user");
 
     private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -66,8 +63,6 @@ public class Query implements TBase<Query, Query._Fields>, java.io.Serializable,
           return CONFIGURATION;
         case 4: // HADOOP_USER
           return HADOOP_USER;
-        case 5: // HADOOP_GROUPS
-          return HADOOP_GROUPS;
         default:
           return null;
       }
@@ -119,9 +114,6 @@ public class Query implements TBase<Query, Query._Fields>, java.io.Serializable,
             new FieldValueMetaData(TType.STRING))));
     tmpMap.put(_Fields.HADOOP_USER, new FieldMetaData("hadoop_user", TFieldRequirementType.DEFAULT, 
         new FieldValueMetaData(TType.STRING)));
-    tmpMap.put(_Fields.HADOOP_GROUPS, new FieldMetaData("hadoop_groups", TFieldRequirementType.DEFAULT, 
-        new ListMetaData(TType.LIST, 
-            new FieldValueMetaData(TType.STRING))));
     metaDataMap = Collections.unmodifiableMap(tmpMap);
     FieldMetaData.addStructMetaDataMap(Query.class, metaDataMap);
   }
@@ -132,14 +124,12 @@ public class Query implements TBase<Query, Query._Fields>, java.io.Serializable,
   public Query(
     String query,
     List<String> configuration,
-    String hadoop_user,
-    List<String> hadoop_groups)
+    String hadoop_user)
   {
     this();
     this.query = query;
     this.configuration = configuration;
     this.hadoop_user = hadoop_user;
-    this.hadoop_groups = hadoop_groups;
   }
 
   /**
@@ -159,13 +149,6 @@ public class Query implements TBase<Query, Query._Fields>, java.io.Serializable,
     if (other.isSetHadoop_user()) {
       this.hadoop_user = other.hadoop_user;
     }
-    if (other.isSetHadoop_groups()) {
-      List<String> __this__hadoop_groups = new ArrayList<String>();
-      for (String other_element : other.hadoop_groups) {
-        __this__hadoop_groups.add(other_element);
-      }
-      this.hadoop_groups = __this__hadoop_groups;
-    }
   }
 
   public Query deepCopy() {
@@ -177,7 +160,6 @@ public class Query implements TBase<Query, Query._Fields>, java.io.Serializable,
     this.query = null;
     this.configuration = null;
     this.hadoop_user = null;
-    this.hadoop_groups = null;
   }
 
   public String getQuery() {
@@ -267,45 +249,6 @@ public class Query implements TBase<Query, Query._Fields>, java.io.Serializable,
     }
   }
 
-  public int getHadoop_groupsSize() {
-    return (this.hadoop_groups == null) ? 0 : this.hadoop_groups.size();
-  }
-
-  public java.util.Iterator<String> getHadoop_groupsIterator() {
-    return (this.hadoop_groups == null) ? null : this.hadoop_groups.iterator();
-  }
-
-  public void addToHadoop_groups(String elem) {
-    if (this.hadoop_groups == null) {
-      this.hadoop_groups = new ArrayList<String>();
-    }
-    this.hadoop_groups.add(elem);
-  }
-
-  public List<String> getHadoop_groups() {
-    return this.hadoop_groups;
-  }
-
-  public Query setHadoop_groups(List<String> hadoop_groups) {
-    this.hadoop_groups = hadoop_groups;
-    return this;
-  }
-
-  public void unsetHadoop_groups() {
-    this.hadoop_groups = null;
-  }
-
-  /** Returns true if field hadoop_groups is set (has been asigned a value) and false otherwise */
-  public boolean isSetHadoop_groups() {
-    return this.hadoop_groups != null;
-  }
-
-  public void setHadoop_groupsIsSet(boolean value) {
-    if (!value) {
-      this.hadoop_groups = null;
-    }
-  }
-
   public void setFieldValue(_Fields field, Object value) {
     switch (field) {
     case QUERY:
@@ -332,14 +275,6 @@ public class Query implements TBase<Query, Query._Fields>, java.io.Serializable,
       }
       break;
 
-    case HADOOP_GROUPS:
-      if (value == null) {
-        unsetHadoop_groups();
-      } else {
-        setHadoop_groups((List<String>)value);
-      }
-      break;
-
     }
   }
 
@@ -354,9 +289,6 @@ public class Query implements TBase<Query, Query._Fields>, java.io.Serializable,
     case HADOOP_USER:
       return getHadoop_user();
 
-    case HADOOP_GROUPS:
-      return getHadoop_groups();
-
     }
     throw new IllegalStateException();
   }
@@ -374,8 +306,6 @@ public class Query implements TBase<Query, Query._Fields>, java.io.Serializable,
       return isSetConfiguration();
     case HADOOP_USER:
       return isSetHadoop_user();
-    case HADOOP_GROUPS:
-      return isSetHadoop_groups();
     }
     throw new IllegalStateException();
   }
@@ -420,15 +350,6 @@ public class Query implements TBase<Query, Query._Fields>, java.io.Serializable,
         return false;
     }
 
-    boolean this_present_hadoop_groups = true && this.isSetHadoop_groups();
-    boolean that_present_hadoop_groups = true && that.isSetHadoop_groups();
-    if (this_present_hadoop_groups || that_present_hadoop_groups) {
-      if (!(this_present_hadoop_groups && that_present_hadoop_groups))
-        return false;
-      if (!this.hadoop_groups.equals(that.hadoop_groups))
-        return false;
-    }
-
     return true;
   }
 
@@ -451,11 +372,6 @@ public class Query implements TBase<Query, Query._Fields>, java.io.Serializable,
     if (present_hadoop_user)
       builder.append(hadoop_user);
 
-    boolean present_hadoop_groups = true && (isSetHadoop_groups());
-    builder.append(present_hadoop_groups);
-    if (present_hadoop_groups)
-      builder.append(hadoop_groups);
-
     return builder.toHashCode();
   }
 
@@ -497,16 +413,6 @@ public class Query implements TBase<Query, Query._Fields>, java.io.Serializable,
         return lastComparison;
       }
     }
-    lastComparison = Boolean.valueOf(isSetHadoop_groups()).compareTo(typedOther.isSetHadoop_groups());
-    if (lastComparison != 0) {
-      return lastComparison;
-    }
-    if (isSetHadoop_groups()) {
-      lastComparison = TBaseHelper.compareTo(this.hadoop_groups, typedOther.hadoop_groups);
-      if (lastComparison != 0) {
-        return lastComparison;
-      }
-    }
     return 0;
   }
 
@@ -555,23 +461,6 @@ public class Query implements TBase<Query, Query._Fields>, java.io.Serializable,
             TProtocolUtil.skip(iprot, field.type);
           }
           break;
-        case 5: // HADOOP_GROUPS
-          if (field.type == TType.LIST) {
-            {
-              TList _list3 = iprot.readListBegin();
-              this.hadoop_groups = new ArrayList<String>(_list3.size);
-              for (int _i4 = 0; _i4 < _list3.size; ++_i4)
-              {
-                String _elem5;
-                _elem5 = iprot.readString();
-                this.hadoop_groups.add(_elem5);
-              }
-              iprot.readListEnd();
-            }
-          } else { 
-            TProtocolUtil.skip(iprot, field.type);
-          }
-          break;
         default:
           TProtocolUtil.skip(iprot, field.type);
       }
@@ -596,9 +485,9 @@ public class Query implements TBase<Query, Query._Fields>, java.io.Serializable,
       oprot.writeFieldBegin(CONFIGURATION_FIELD_DESC);
       {
         oprot.writeListBegin(new TList(TType.STRING, this.configuration.size()));
-        for (String _iter6 : this.configuration)
+        for (String _iter3 : this.configuration)
         {
-          oprot.writeString(_iter6);
+          oprot.writeString(_iter3);
         }
         oprot.writeListEnd();
       }
@@ -609,18 +498,6 @@ public class Query implements TBase<Query, Query._Fields>, java.io.Serializable,
       oprot.writeString(this.hadoop_user);
       oprot.writeFieldEnd();
     }
-    if (this.hadoop_groups != null) {
-      oprot.writeFieldBegin(HADOOP_GROUPS_FIELD_DESC);
-      {
-        oprot.writeListBegin(new TList(TType.STRING, this.hadoop_groups.size()));
-        for (String _iter7 : this.hadoop_groups)
-        {
-          oprot.writeString(_iter7);
-        }
-        oprot.writeListEnd();
-      }
-      oprot.writeFieldEnd();
-    }
     oprot.writeFieldStop();
     oprot.writeStructEnd();
   }
@@ -653,14 +530,6 @@ public class Query implements TBase<Query, Query._Fields>, java.io.Serializable,
       sb.append(this.hadoop_user);
     }
     first = false;
-    if (!first) sb.append(", ");
-    sb.append("hadoop_groups:");
-    if (this.hadoop_groups == null) {
-      sb.append("null");
-    } else {
-      sb.append(this.hadoop_groups);
-    }
-    first = false;
     sb.append(")");
     return sb.toString();
   }

+ 16 - 16
apps/beeswax/java/gen-java/com/cloudera/beeswax/api/Results.java

@@ -612,13 +612,13 @@ public class Results implements TBase<Results, Results._Fields>, java.io.Seriali
         case 2: // COLUMNS
           if (field.type == TType.LIST) {
             {
-              TList _list8 = iprot.readListBegin();
-              this.columns = new ArrayList<String>(_list8.size);
-              for (int _i9 = 0; _i9 < _list8.size; ++_i9)
+              TList _list4 = iprot.readListBegin();
+              this.columns = new ArrayList<String>(_list4.size);
+              for (int _i5 = 0; _i5 < _list4.size; ++_i5)
               {
-                String _elem10;
-                _elem10 = iprot.readString();
-                this.columns.add(_elem10);
+                String _elem6;
+                _elem6 = iprot.readString();
+                this.columns.add(_elem6);
               }
               iprot.readListEnd();
             }
@@ -629,13 +629,13 @@ public class Results implements TBase<Results, Results._Fields>, java.io.Seriali
         case 3: // DATA
           if (field.type == TType.LIST) {
             {
-              TList _list11 = iprot.readListBegin();
-              this.data = new ArrayList<String>(_list11.size);
-              for (int _i12 = 0; _i12 < _list11.size; ++_i12)
+              TList _list7 = iprot.readListBegin();
+              this.data = new ArrayList<String>(_list7.size);
+              for (int _i8 = 0; _i8 < _list7.size; ++_i8)
               {
-                String _elem13;
-                _elem13 = iprot.readString();
-                this.data.add(_elem13);
+                String _elem9;
+                _elem9 = iprot.readString();
+                this.data.add(_elem9);
               }
               iprot.readListEnd();
             }
@@ -681,9 +681,9 @@ public class Results implements TBase<Results, Results._Fields>, java.io.Seriali
       oprot.writeFieldBegin(COLUMNS_FIELD_DESC);
       {
         oprot.writeListBegin(new TList(TType.STRING, this.columns.size()));
-        for (String _iter14 : this.columns)
+        for (String _iter10 : this.columns)
         {
-          oprot.writeString(_iter14);
+          oprot.writeString(_iter10);
         }
         oprot.writeListEnd();
       }
@@ -693,9 +693,9 @@ public class Results implements TBase<Results, Results._Fields>, java.io.Seriali
       oprot.writeFieldBegin(DATA_FIELD_DESC);
       {
         oprot.writeListBegin(new TList(TType.STRING, this.data.size()));
-        for (String _iter15 : this.data)
+        for (String _iter11 : this.data)
         {
-          oprot.writeString(_iter15);
+          oprot.writeString(_iter11);
         }
         oprot.writeListEnd();
       }

+ 117 - 55
apps/beeswax/java/src/com/cloudera/beeswax/BeeswaxServiceImpl.java

@@ -21,10 +21,13 @@ import java.io.IOException;
 import java.io.OutputStream;
 import java.io.PrintStream;
 import java.io.UnsupportedEncodingException;
+import java.lang.reflect.UndeclaredThrowableException;
 import java.net.HttpURLConnection;
 import java.net.URL;
 import java.security.KeyManagementException;
 import java.security.NoSuchAlgorithmException;
+import java.security.PrivilegedActionException;
+import java.security.PrivilegedExceptionAction;
 import java.security.SecureRandom;
 import java.text.SimpleDateFormat;
 import java.util.ArrayList;
@@ -61,7 +64,7 @@ import org.apache.hadoop.hive.ql.processors.CommandProcessorFactory;
 import org.apache.hadoop.hive.ql.QueryPlan;
 import org.apache.hadoop.hive.ql.session.SessionState;
 import org.apache.hadoop.hive.serde.Constants;
-import org.apache.hadoop.security.UnixUserGroupInformation;
+import org.apache.hadoop.security.UserGroupInformation;
 import org.apache.log4j.Logger;
 import org.apache.thrift.TException;
 
@@ -109,7 +112,7 @@ public class BeeswaxServiceImpl implements BeeswaxService.Iface {
    * EXCEPTION is also valid.
    */
   private class RunningQueryState {
-    private int state = QueryState.CREATED;
+    private QueryState state = QueryState.CREATED;
     // Thread local used by Hive quite a bit.
     private SessionState sessionState;
     private Throwable exception;
@@ -183,7 +186,7 @@ public class BeeswaxServiceImpl implements BeeswaxService.Iface {
       state = QueryState.COMPILED;
     }
 
-    private void assertState(int expected) {
+    private void assertState(QueryState expected) {
       if (state != expected) {
         throw new IllegalStateException(String.format("Expected %s, but state is: %s",
             expected, state));
@@ -242,13 +245,6 @@ public class BeeswaxServiceImpl implements BeeswaxService.Iface {
       if (query.hadoop_user == null) {
         throw new RuntimeException("User must be specified.");
       }
-      StringBuilder ugi = new StringBuilder();
-      ugi.append(query.hadoop_user);
-      for (String group : query.hadoop_groups) {
-        ugi.append(",");
-        ugi.append(group);
-      }
-      hiveConf.set(UnixUserGroupInformation.UGI_PROPERTY_NAME, ugi.toString());
 
       // Update scratch dir (to have one per user)
       File scratchDir = new File("/tmp/hive-beeswax-" + query.hadoop_user);
@@ -448,10 +444,10 @@ public class BeeswaxServiceImpl implements BeeswaxService.Iface {
       // Only one person can access a running query at a time.
       synchronized(this) {
         switch(state) {
-        case QueryState.RUNNING:
+        case RUNNING:
           r.ready = false;
           break;
-        case QueryState.FINISHED:
+        case FINISHED:
           bringUp();
           r.ready = true;
           try {
@@ -460,7 +456,7 @@ public class BeeswaxServiceImpl implements BeeswaxService.Iface {
             throw new BeeswaxException(e.toString(), logContext.getName(), handle);
           }
           break;
-        case QueryState.EXCEPTION:
+        case EXCEPTION:
           if (exception instanceof BeeswaxException) {
             throw (BeeswaxException) exception;
           } else {
@@ -607,6 +603,37 @@ public class BeeswaxServiceImpl implements BeeswaxService.Iface {
     evicter.start();
   }
 
+
+  private <T> T doWithState(RunningQueryState state, PrivilegedExceptionAction<T> action)
+  throws BeeswaxException
+  {
+    try{
+      UserGroupInformation ugi;
+      if (UserGroupInformation.isSecurityEnabled())
+        ugi = UserGroupInformation.createProxyUser(state.query.hadoop_user, UserGroupInformation.getLoginUser());
+      else {
+        ugi = UserGroupInformation.createRemoteUser(state.query.hadoop_user);
+      }
+      return ugi.doAs(action);
+    } catch (UndeclaredThrowableException e) {
+      if (e.getUndeclaredThrowable() instanceof PrivilegedActionException) {
+        Throwable bwe = e.getUndeclaredThrowable().getCause();
+        if (bwe instanceof BeeswaxException) {
+          LOG.error("Caught BeeswaxException", (BeeswaxException) bwe);
+          throw (BeeswaxException) bwe;
+        }
+      }
+      LOG.error("Caught unexpected exception.", e);
+      throw new BeeswaxException(e.getMessage(), state.handle.log_context, state.handle);
+    } catch (IOException e) {
+      LOG.error("Caught IOException", e);
+      throw new BeeswaxException(e.getMessage(), state.handle.log_context, state.handle);
+    } catch (InterruptedException e) {
+      LOG.error("Caught InterruptedException", e);
+      throw new BeeswaxException(e.getMessage(), state.handle.log_context, state.handle);
+    }
+  }
+
   /**
    * Submit a query and return a handle (QueryHandle). The query runs asynchronously.
    * Queries can be long-lasting, so we push the execution into a new state.
@@ -622,23 +649,31 @@ public class BeeswaxServiceImpl implements BeeswaxService.Iface {
 
     // Make an administrative record
     final RunningQueryState state = new RunningQueryState(query, lc);
-    state.setQueryHandle(handle);
-    runningQueries.put(handle.id, state);
-    state.initialize();
-    // All kinds of things can go wrong when we compile it. So catch all.
     try {
-      state.compile();
-    } catch (BeeswaxException perr) {
-      state.saveException(perr);
-      throw perr;
-    } catch (Throwable t) {
-      state.saveException(t);
-      throw new BeeswaxException(t.toString(), handle.log_context, handle);
-    }
-    // Now spin off the query.
-    state.submitTo(executor, lc);
-
-    return handle;
+      return doWithState(state,
+          new PrivilegedExceptionAction<QueryHandle>() {
+            public QueryHandle run() throws Exception {
+              state.setQueryHandle(handle);
+              runningQueries.put(handle.id, state);
+              state.initialize();
+              // All kinds of things can go wrong when we compile it. So catch all.
+              try {
+                state.compile();
+              } catch (BeeswaxException perr) {
+                state.saveException(perr);
+                throw perr;
+              } catch (Throwable t) {
+                state.saveException(t);
+                throw new BeeswaxException(t.toString(), handle.log_context, handle);
+              }
+              // Now spin off the query.
+              state.submitTo(executor, lc);
+              return handle;
+            }
+          });
+    } catch (BeeswaxException e) {
+      throw e;
+    }
   }
 
   /**
@@ -664,23 +699,32 @@ public class BeeswaxServiceImpl implements BeeswaxService.Iface {
    * Get the query plan for a query.
    */
   @Override
-  public QueryExplanation explain(Query query) throws BeeswaxException, TException {
-    String contextName = UUID.randomUUID().toString();
+  public QueryExplanation explain(final Query query) throws BeeswaxException, TException {
+    final String contextName = UUID.randomUUID().toString();
     LogContext lc = LogContext.registerCurrentThread(contextName);
-    RunningQueryState state = new RunningQueryState(query, lc);
-    state.initialize();
-    // All kinds of things can go wrong when we compile it. So catch all.
-    QueryExplanation exp;
+    final RunningQueryState state = new RunningQueryState(query, lc);
     try {
-      exp = state.explain();
-    } catch (BeeswaxException perr) {
-      throw perr;
-    } catch (Throwable t) {
-      throw new BeeswaxException(t.toString(), contextName, null);
-    }
-    // On success, we remove the LogContext
-    LogContext.destroyContext(contextName);
-    return exp;
+      return doWithState(state,
+          new PrivilegedExceptionAction<QueryExplanation>() {
+            public QueryExplanation run() throws Exception {
+              state.initialize();
+              QueryExplanation exp;
+              // All kinds of things can go wrong when we compile it. So catch all.
+              try {
+                exp = state.explain();
+              } catch (BeeswaxException perr) {
+                throw perr;
+              } catch (Throwable t) {
+                throw new BeeswaxException(t.toString(), contextName, null);
+              }
+              // On success, we remove the LogContext
+              LogContext.destroyContext(contextName);
+              return exp;
+            }
+          });
+    } catch (BeeswaxException e) {
+      throw e;
+    }
   }
 
   /**
@@ -691,17 +735,25 @@ public class BeeswaxServiceImpl implements BeeswaxService.Iface {
    * @param fromBeginning  If true, rewind to the first row. Otherwise fetch from last position.
    */
   @Override
-  public Results fetch(QueryHandle handle, boolean fromBeginning)
+  public Results fetch(final QueryHandle handle, final boolean fromBeginning)
       throws QueryNotFoundException, BeeswaxException {
     LogContext.unregisterCurrentThread();
     validateHandle(handle);
     LogContext.registerCurrentThread(handle.log_context);
-    RunningQueryState state = runningQueries.get(handle.id);
-    if (state == null) {
-      throw new QueryNotFoundException();
+    final RunningQueryState state = runningQueries.get(handle.id);
+    try {
+      return doWithState(state,
+          new PrivilegedExceptionAction<Results>() {
+            public Results run() throws Exception {
+              if (state == null) {
+                throw new QueryNotFoundException();
+              }
+              return state.fetch(fromBeginning);
+            }
+          });
+    } catch (BeeswaxException e) {
+      throw e;
     }
-    Results res = state.fetch(fromBeginning);
-    return res;
   }
 
   @Override
@@ -722,7 +774,7 @@ public class BeeswaxServiceImpl implements BeeswaxService.Iface {
    * @param handle The handle from query()
    */
   @Override
-  public int get_state(QueryHandle handle) throws QueryNotFoundException {
+  public QueryState get_state(final QueryHandle handle) throws QueryNotFoundException {
     LogContext.unregisterCurrentThread();
     validateHandle(handle);
     LogContext.registerCurrentThread(handle.log_context);
@@ -739,15 +791,25 @@ public class BeeswaxServiceImpl implements BeeswaxService.Iface {
    * @param handle
    */
   @Override
-  public ResultsMetadata get_results_metadata(QueryHandle handle) throws QueryNotFoundException {
+  public ResultsMetadata get_results_metadata(final QueryHandle handle) throws QueryNotFoundException {
     LogContext.unregisterCurrentThread();
     validateHandle(handle);
     LogContext.registerCurrentThread(handle.log_context);
-    RunningQueryState state = runningQueries.get(handle.id);
-    if (state == null) {
+    final RunningQueryState state = runningQueries.get(handle.id);
+    try {
+      return doWithState(state,
+          new PrivilegedExceptionAction<ResultsMetadata>() {
+            public ResultsMetadata run() throws Exception {
+              if (state == null) {
+                throw new QueryNotFoundException();
+              }
+              return state.getResultMetadata();
+            }
+          });
+    } catch (BeeswaxException e) {
+      LOG.error("Caught BeeswaxException.", e);
       throw new QueryNotFoundException();
     }
-    return state.getResultMetadata();
   }
 
   /**

+ 4 - 2
apps/beeswax/java/src/com/cloudera/beeswax/Server.java

@@ -157,8 +157,8 @@ public class Server {
    */
   private static void createDirectoriesAsNecessary() {
     try {
+      LOG.debug("Classpath: " + System.getProperty("java.class.path"));
       HiveConf conf = new HiveConf(Driver.class);
-      conf.set("hadoop.ugi", superUser + ",supergroup");
       FileSystem fs = FileSystem.get(conf);
       Path tmpDir = new Path("/tmp");
       Path metaDir = new Path(conf
@@ -174,7 +174,9 @@ public class Server {
         }
       }
     } catch (IOException e) {
-      LOG.error("Error while trying to check/create /tmp and warehouse directory.", e);
+      HiveConf conf = new HiveConf(Driver.class);
+      LOG.error("Error while trying to check/create /tmp and warehouse directory " + conf
+          .get(HiveConf.ConfVars.METASTOREWAREHOUSE.varname), e);
     }
   }
 

+ 0 - 2
apps/beeswax/src/beeswax/management/commands/beeswax_install_examples.py

@@ -49,7 +49,6 @@ import hive_metastore.ttypes
 
 LOG = logging.getLogger(__name__)
 HADOOP_USER = 'hue'
-HADOOP_GRP = 'supergroup'
 
 class InstallException(Exception):
   pass
@@ -141,7 +140,6 @@ def _make_query_msg(hql):
   """
   query_msg = BeeswaxService.Query(query=hql, configuration=[])
   query_msg.hadoop_user = HADOOP_USER
-  query_msg.hadoop_groups = (HADOOP_GRP,)
   return query_msg
 
 

+ 2 - 1
apps/beeswax/src/beeswax/management/commands/beeswax_server.py

@@ -52,7 +52,8 @@ class Command(NoArgsCommand):
       '--desktop-host',
       str(dt_host),
       '--desktop-port',
-      str(desktop.conf.HTTP_PORT.get()),
+      "8000",
+      #str(desktop.conf.HTTP_PORT.get()),
     ]
 
     # Running on HTTPS?

+ 6 - 1
apps/beeswax/src/beeswax/tests.py

@@ -214,6 +214,9 @@ for x in sys.stdin:
     assert_equal(257, response.content.count("\n"))
 
   def test_query_with_udf(self):
+    """
+    Testing query with udf
+    """
     response = _make_query(self.client, "SELECT my_sqrt(foo), my_power(foo, foo) FROM test WHERE foo=4",
       udfs=[('my_sqrt', 'org.apache.hadoop.hive.ql.udf.UDFSqrt'),
         ('my_power', 'org.apache.hadoop.hive.ql.udf.UDFPower')], local=False)
@@ -264,6 +267,9 @@ for x in sys.stdin:
     check_error_in_response(resp)
 
   def test_parameterization(self):
+    """
+    Test parameterization
+    """
     response = _make_query(self.client, "SELECT foo FROM test WHERE foo='$x' and bar='$y'", is_parameterized=False)
     # Assert no parameterization was offered
     assert_equal("watch_wait.mako", response.template, "we should have seen the template for a query executing")
@@ -377,7 +383,6 @@ for x in sys.stdin:
     query_msg.query = 'SELECT * FROM test'
     query_msg.configuration = []
     query_msg.hadoop_user = "test"
-    query_msg.hadoop_groups = ["test"]
     handle = beeswax.db_utils.db_client().query(query_msg)
     query_data = beeswax.models.QueryHistory(server_id=handle.id, log_context=handle.log_context)
     # Get the result in xls. Then translate it into csv.

+ 2 - 3
apps/beeswax/src/beeswax/views.py

@@ -108,7 +108,7 @@ def drop_table(request, table):
 
 def read_table(request, table):
   """View function for select * from table"""
-  hql = "SELECT * FROM `%s`" % (table,)
+  hql = "SELECT * FROM %s" % (table,)
   query_msg = make_beeswax_query(request, hql)
   try:
     return execute_directly(request, query_msg, tablename=table)
@@ -177,7 +177,6 @@ def make_beeswax_query(request, hql, query_form=None):
 
   # Configure running user and group.
   query_msg.hadoop_user = request.user.username
-  query_msg.hadoop_groups = request.user.get_groups()
 
   if query_form is not None:
     for f in query_form.settings.forms:
@@ -962,7 +961,7 @@ def _save_results_ctas(request, query_history, target_table, result_meta):
   """
   # Case 1: The results are straight from an existing table
   if result_meta.in_tablename:
-    hql = 'CREATE TABLE `%s` AS SELECT * FROM `%s`' % (target_table, result_meta.in_tablename)
+    hql = 'CREATE TABLE `%s` AS SELECT * FROM %s' % (target_table, result_meta.in_tablename)
     query_msg = make_beeswax_query(request, hql)
     # Display the CTAS running. Could take a long time.
     return execute_directly(request, query_msg, on_success_url=urlresolvers.reverse(show_tables))

+ 0 - 1
apps/beeswax/thrift/beeswax.thrift

@@ -31,7 +31,6 @@ struct Query {
 
   // User and groups to "act as" for purposes of Hadoop.
   4: string hadoop_user;
-  5: list<string> hadoop_groups;
 }
 
 typedef string LogContextId

+ 16 - 17
desktop/libs/hadoop/java/src/java/org/apache/hadoop/thriftfs/HadoopThriftAuthBridge.java

@@ -130,18 +130,17 @@ class HadoopThriftAuthBridge {
      */
     public TTransportFactory createTransportFactory() throws TTransportException
     {
-      // Parse out the kerberos shortname, host, realm.
-      String kerberosPrincipal = realUgi.getUserName();
-      final String names[] = SaslRpcServer.splitKerberosName(kerberosPrincipal);
+      // Parse out the kerberos principal, host, realm.
+      String kerberosName = realUgi.getUserName();
+      final String names[] = SaslRpcServer.splitKerberosName(kerberosName);
       if (names.length != 3) {
-        throw new TTransportException("Kerberos principal should have 3 parts: " +
-                                      kerberosPrincipal);
+        throw new TTransportException("Kerberos principal should have 3 parts: " + kerberosName);
       }
 
       TSaslServerTransport.Factory transFactory = new TSaslServerTransport.Factory();
       transFactory.addServerDefinition(
         AuthMethod.KERBEROS.getMechanismName(),
-        names[0], names[1],  // shortname and host
+        names[0], names[1],  // two parts of kerberos principal
         SaslRpcServer.SASL_PROPS,
         new SaslRpcServer.SaslGssCallbackHandler());
 
@@ -262,18 +261,18 @@ class HadoopThriftAuthBridge {
     public void open() throws TTransportException {
       try {
         ugi.doAs(new PrivilegedExceptionAction<Void>() {
-            public Void run() {
-              try {
-                wrapped.open();
-              } catch (TTransportException tte) {
-                // Wrap the transport exception in an RTE, since UGI.doAs() then goes
-                // and unwraps this for us out of the doAs block. We then unwrap one
-                // more time in our catch clause to get back the TTE. (ugh)
-                throw new RuntimeException(tte);
-              }
-              return null;
+          public Void run() {
+            try {
+              wrapped.open();
+            } catch (TTransportException tte) {
+              // Wrap the transport exception in an RTE, since UGI.doAs() then goes
+              // and unwraps this for us out of the doAs block. We then unwrap one
+              // more time in our catch clause to get back the TTE. (ugh)
+              throw new RuntimeException(tte);
             }
-          });
+            return null;
+          }
+        });
       } catch (IOException ioe) {
         assert false : "Never thrown!";
         throw new RuntimeException("Received an ioe we never threw!", ioe);

+ 4 - 2
desktop/libs/hadoop/src/hadoop/conf.py

@@ -137,8 +137,10 @@ MR_CLUSTERS = UnspecifiedConfigSection(
       JT_KERBEROS_PRINCIPAL=Config("jt_kerberos_principal", help="Kerberos principal for JobTracker",
                                    default="mapred", type=str),
       SECURITY_ENABLED=Config("security_enabled", help="Is running with Kerberos authentication",
-                              default=False, type=coerce_bool))
-))
+                              default=False, type=coerce_bool)
+    )
+  )
+)
 
 
 def config_validator():

+ 8 - 5
desktop/libs/hadoop/src/hadoop/mini_cluster.py

@@ -59,9 +59,9 @@ MAX_CLUSTER_STARTUP_TIME = 120.0
 
 # users and their groups which are used in Hue tests.
 TEST_USER_GROUP_MAPPING = {
-   'test': ['test'], 'chown_test': ['chown_test'],
+   'test': ['test','users','supergroup'], 'chown_test': ['chown_test'],
    'notsuperuser': ['notsuperuser'], 'gamma': ['gamma'],
-   'webui': ['webui']
+   'webui': ['webui'], 'hue': ['supergroup']
 }
 
 LOGGER=logging.getLogger(__name__)
@@ -123,7 +123,9 @@ rpc.class=org.apache.hadoop.metrics.spi.NoEmitMetricsContext
       tmppath('ugm.properties'))
 
     write_config({'hadoop.security.group.mapping': 'org.apache.hadoop.security.StaticUserGroupMapping',
-      'hadoop.security.static.group.mapping.file': tmppath('ugm.properties')}, tmppath('in-conf/core-site.xml'))
+      'hadoop.security.static.group.mapping.file': tmppath('ugm.properties'),
+      'hadoop.proxyuser.%s.groups' % (self.superuser,): 'users,supergroup',
+      'hadoop.proxyuser.%s.hosts' % (self.superuser,): 'localhost'}, tmppath('in-conf/core-site.xml'))
 
     hadoop_policy_keys = ['client', 'client.datanode', 'datanode', 'inter.datanode', 'namenode', 'inter.tracker', 'job.submission', 'task.umbilical', 'refresh.policy', 'admin.operations']
     hadoop_policy_config = {}
@@ -241,7 +243,8 @@ rpc.class=org.apache.hadoop.metrics.spi.NoEmitMetricsContext
     write_config(self.config, tmppath("conf/core-site.xml"), 
       ["fs.default.name", "jobclient.completion.poll.interval",
        "fs.checkpoint.period", "fs.checkpoint.dir",
-       'hadoop.security.group.mapping', 'hadoop.security.static.group.mapping.file'])
+       'hadoop.security.group.mapping', 'hadoop.security.static.group.mapping.file',
+       'hadoop.proxyuser.'+self.superuser+'.groups', 'hadoop.proxyuser.'+self.superuser+'.hosts'])
     write_config(self.config, tmppath("conf/hdfs-site.xml"), ["fs.default.name", "dfs.http.address", "dfs.secondary.http.address"])
     # mapred.job.tracker isn't written out into self.config, so we fill
     # that one out more manually.
@@ -250,7 +253,7 @@ rpc.class=org.apache.hadoop.metrics.spi.NoEmitMetricsContext
     write_config(hadoop_policy_config, tmppath('conf/hadoop-policy.xml'))
 
     # Once the config is written out, we can start the 2NN.
-    args = [hadoop.conf.HADOOP_BIN.get(), 
+    args = [hadoop.conf.HADOOP_BIN.get(),
       '--config', self.config_dir,
       'secondarynamenode']