You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@phoenix.apache.org by GitBox <gi...@apache.org> on 2021/05/09 15:24:22 UTC

[GitHub] [phoenix] stoty commented on a change in pull request #1184: PHOENIX-6357 Change all command line tools to use the fixed commons-c…

stoty commented on a change in pull request #1184:
URL: https://github.com/apache/phoenix/pull/1184#discussion_r628905242



##########
File path: phoenix-core/src/main/java/org/apache/phoenix/mapreduce/AbstractBulkLoadTool.java
##########
@@ -181,40 +181,12 @@ public int run(String[] args) throws Exception {
         return loadData(conf, cmdLine);
     }
 
-    /**
-     * Check schema or table name that start with two double quotes i.e ""t"" -> true
-     */
-    private boolean isStartWithTwoDoubleQuotes (String name) {
-        boolean start = false;
-        boolean end = false;
-        if (name != null && name.length() > 1) {
-             int length = name.length();
-             start = name.substring(0,2).equals("\"\"");
-             end =  name.substring(length-2, length).equals("\"\"");
-             if (start && !end) {
-                 throw new IllegalArgumentException("Invalid table/schema name " + name +
-                         ". Please check if name end with two double quotes.");
-             }
-        }
-        return start;
-    }
-
 
     private int loadData(Configuration conf, CommandLine cmdLine) throws Exception {
         String tableName = cmdLine.getOptionValue(TABLE_NAME_OPT.getOpt());
         String schemaName = cmdLine.getOptionValue(SCHEMA_NAME_OPT.getOpt());
         String indexTableName = cmdLine.getOptionValue(INDEX_TABLE_NAME_OPT.getOpt());
-        boolean quotedTableName = isStartWithTwoDoubleQuotes(tableName);
-        if (quotedTableName) {
-            // Commons-cli cannot parse full quoted argument i.e "t" (CLI-275).
-            // if \"\"t\"\" passed, then both pairs of quoted are left intact as ""t"".
-            // So remove one pair of quote from tablename ""t"" -> "t".
-            tableName = tableName.substring(1, tableName.length() - 1);
-        }
-        boolean quotedSchemaName = isStartWithTwoDoubleQuotes(schemaName);
-        if (quotedSchemaName) {
-            schemaName = schemaName.substring(1,schemaName.length() - 1);
-        }
+

Review comment:
       Yes, this was for the double doublequote hack to workaround CLI-254, which we patch in phoenix-thirdparty now.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org