----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/63426/#review193841 -----------------------------------------------------------
addons/hbase-bridge/src/main/java/org/apache/atlas/hbase/util/ImportHBaseEntities.java Lines 127 (patched) <https://reviews.apache.org/r/63426/#comment272475> Consider rewritting the validation as below: String option = args.length > 0 ? args[0] : null; String value = args.length > 1 ? args[1] : null; if (option != null && value == null) { if (option.equalsIgnoreCase(NAMESPACE_FLAG) || option.equalsIgnoreCase(NAMESPACE_FULL_FLAG) || option.equalsIgnoreCase(TABLE_FLAG) || option.equalsIgnoreCase(TABLE_FULL_FLAG)) { System.out.println("Usage: import-hive.sh [-n <namespace> OR --namespace <namespace>] [-t <table> OR --table <table>]"); ret = false; } } addons/hbase-bridge/src/main/java/org/apache/atlas/hbase/util/ImportHBaseEntitiesBase.java Lines 70 (patched) <https://reviews.apache.org/r/63426/#comment272474> Should the following need to be static? importNameSpace, importTable, cmd If possible, consider marking these as 'final'. Also, instead of using booleans importNameSpace and importTable, consider using following strings and methods - for better readability: private final String namespaceToImport; // initialize to null, if import is not for a specific namespace private final String tableToImport; // initialize to null, if import is not for a specific table public String getNamespaceToImport() { return namespaceToImport; } public String getTableToImport() { return tableToImport; } addons/hbase-bridge/src/main/java/org/apache/atlas/hbase/util/ImportHBaseEntitiesBase.java Lines 72 (patched) <https://reviews.apache.org/r/63426/#comment272472> 'options' and 'parser' seem to be used only in the constructor, ImportHBaseEntitiesBase(). Consider making these as local variables inside the constructor. - Madhan Neethiraj On Dec. 13, 2017, 9:47 p.m., Ramesh Mani wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/63426/ > ----------------------------------------------------------- > > (Updated Dec. 13, 2017, 9:47 p.m.) > > > Review request for atlas, Apoorv Naik, Madhan Neethiraj, and Sarath > Subramanian. > > > Bugs: ATLAS-2051 > https://issues.apache.org/jira/browse/ATLAS-2051 > > > Repository: atlas > > > Description > ------- > > ATLAS-2051:Provide a utility to Import HBase entities into Atlas > > > Diffs > ----- > > .gitignore 2a53de2 > addons/hbase-bridge/pom.xml 76be506 > addons/hbase-bridge/src/bin/import-hbase.sh PRE-CREATION > > addons/hbase-bridge/src/main/java/org/apache/atlas/hbase/util/ImportHBaseEntities.java > PRE-CREATION > > addons/hbase-bridge/src/main/java/org/apache/atlas/hbase/util/ImportHBaseEntitiesBase.java > PRE-CREATION > distro/src/main/assemblies/standalone-package.xml 052b28b > > > Diff: https://reviews.apache.org/r/63426/diff/3/ > > > Testing > ------- > > Testing done in Local vm > > command > > import-hbase.sh -n || --namespace <namespace> > import-hbase.sh -t || --tablename <tablename> > > ./import-hbase.sh -t demo2:table1 > ./import-hbase.sh -n demo5 > > > Thanks, > > Ramesh Mani > >
