Added key value assignments to arguments.

Project: http://git-wip-us.apache.org/repos/asf/bigtop/repo
Commit: http://git-wip-us.apache.org/repos/asf/bigtop/commit/ebe22bc4
Tree: http://git-wip-us.apache.org/repos/asf/bigtop/tree/ebe22bc4
Diff: http://git-wip-us.apache.org/repos/asf/bigtop/diff/ebe22bc4

Branch: refs/heads/BIGTOP-2666
Commit: ebe22bc49f7609d8a23a9f6d2985ada323d366ad
Parents: 5966b07
Author: Raj Desai <[email protected]>
Authored: Thu Jan 19 15:08:45 2017 -0800
Committer: Roman Shaposhnik <[email protected]>
Committed: Fri Feb 24 11:51:26 2017 -0800

----------------------------------------------------------------------
 .../org/odpi/specs/runtime/hive/HCatalogMR.java | 21 +++++++++++++++-----
 1 file changed, 16 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/bigtop/blob/ebe22bc4/bigtop-tests/spec-tests/runtime/src/main/java/org/odpi/specs/runtime/hive/HCatalogMR.java
----------------------------------------------------------------------
diff --git 
a/bigtop-tests/spec-tests/runtime/src/main/java/org/odpi/specs/runtime/hive/HCatalogMR.java
 
b/bigtop-tests/spec-tests/runtime/src/main/java/org/odpi/specs/runtime/hive/HCatalogMR.java
index 7cb9bbe..4110d5d 100644
--- 
a/bigtop-tests/spec-tests/runtime/src/main/java/org/odpi/specs/runtime/hive/HCatalogMR.java
+++ 
b/bigtop-tests/spec-tests/runtime/src/main/java/org/odpi/specs/runtime/hive/HCatalogMR.java
@@ -46,14 +46,25 @@ public class HCatalogMR extends Configured implements Tool {
 
   @Override
   public int run(String[] args) throws Exception {
+    String inputTable = null;
+    String outputTable = null;
+    String inputSchemaStr = null;
+    String outputSchemaStr = null;
+    for(int i = 0; i < args.length; i++){
+        if(args[i].equalsIgnoreCase("-it")){
+            inputTable = args[i+1];
+        }else if(args[i].equalsIgnoreCase("-ot")){
+            outputTable = args[i+1];
+        }else if(args[i].equalsIgnoreCase("-is")){
+            inputSchemaStr = args[i+1];
+        }else if(args[i].equalsIgnoreCase("-os")){
+            outputSchemaStr = args[i+1];
+        }
+    }
+    
     Configuration conf = getConf();
     args = new GenericOptionsParser(conf, args).getRemainingArgs();
 
-    String inputTable = args[0];
-    String outputTable = args[1];
-    String inputSchemaStr = args[2];
-    String outputSchemaStr = args[3];
-
     conf.set(INPUT_SCHEMA, inputSchemaStr);
     conf.set(OUTPUT_SCHEMA, outputSchemaStr);
 

Reply via email to