You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bigtop.apache.org by rv...@apache.org on 2017/02/27 20:31:12 UTC
[46/50] [abbrv] bigtop git commit: Added key value assignments to
arguments.
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/971f4254
Tree: http://git-wip-us.apache.org/repos/asf/bigtop/tree/971f4254
Diff: http://git-wip-us.apache.org/repos/asf/bigtop/diff/971f4254
Branch: refs/heads/BIGTOP-1406
Commit: 971f4254a10882a08f04c14ff8f6c675f584ff0f
Parents: fceeff4
Author: Raj Desai <rd...@us.ibm.com>
Authored: Thu Jan 19 15:08:45 2017 -0800
Committer: Roman Shaposhnik <rv...@apache.org>
Committed: Fri Feb 24 12:03:53 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/971f4254/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);