[ 
https://issues.apache.org/jira/browse/PHOENIX-6262?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17378117#comment-17378117
 ] 

Richárd Antal commented on PHOENIX-6262:
----------------------------------------

After PHOENIX-6357 we no longer need the double \" around the table and schema 
name.

I've tested the current behaviour and with  {{-t \"example\"}}it was loading 
data to lowercase example table with {{-t example}} to uppercase EXAMPLE table 
as expected. 
It is also working with{{ --table \"example\"}} and {{--table=\"example\"}} to 
lowercase example table and using {{-s \"test\" -t \"example\"}} to bulkload 
data into the lowercase "test"."example" table. 

I know this ticket has been opened before the fix for PHOENIX-6357 but I think 
it solves this issue (as well).

There are already tests for it
[https://github.com/apache/phoenix/blob/62f63c825367abed5ab4d046ebf56830c6798fea/phoenix-core/src/it/java/org/apache/phoenix/end2end/CsvBulkLoadToolIT.java#L689]
 

Can we close this ticket?

> Bulk Load have a bug in lowercase tablename
> -------------------------------------------
>
>                 Key: PHOENIX-6262
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-6262
>             Project: Phoenix
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 5.0.0
>            Reporter: zhengjiewen
>            Assignee: Chao Wang
>            Priority: Major
>         Attachments: PHOENIX-6262.master.001.patch, 
> PHOENIX-6262.master.002.patch, PHOENIX-6262.master.003.patch
>
>
> h1. Bulk Load in lowercase tablename
> {color:#172b4d}when I use phoenix bulk load command to import csv file to 
> phoenix table,{color} there{color:#172b4d} are get error.{color}
> {code:java}
> //代码占位符
> Exception in thread "main" java.lang.IllegalArgumentException: Table 
> "test"."ods_om_om_order_test" not foundException in thread "main" 
> java.lang.IllegalArgumentException: Table "test"."ods_om_om_order_test" not 
> found at 
> org.apache.phoenix.util.SchemaUtil.generateColumnInfo(SchemaUtil.java:956) at 
> org.apache.phoenix.mapreduce.AbstractBulkLoadTool.buildImportColumns(AbstractBulkLoadTool.java:377)
>  at 
> org.apache.phoenix.mapreduce.AbstractBulkLoadTool.loadData(AbstractBulkLoadTool.java:211)
>  at 
> org.apache.phoenix.mapreduce.AbstractBulkLoadTool.run(AbstractBulkLoadTool.java:180)
>  at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:76) at 
> org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:90) at 
> org.apache.phoenix.mapreduce.CsvBulkLoadTool.main(CsvBulkLoadTool.java:109) 
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>  at java.lang.reflect.Method.invoke(Method.java:498) at 
> org.apache.hadoop.util.RunJar.run(RunJar.java:313) at 
> org.apache.hadoop.util.RunJar.main(RunJar.java:227)
> {code}
> my command is :
> {code:java}
> hadoop jar 
> /opt/cloudera/parcels/CDH/lib/hbase/lib/phoenix-5.0.0-cdh6.2.0-client.jar 
> org.apache.phoenix.mapreduce.CsvBulkLoadTool -s \"\"test\"\" -t 
> \"\"ods_om_om_order_test\"\" -i 
> /tmp/phoenix/ods_om_om_order_test5/data.csv{code}
> {color:#172b4d}And I found the source code have a bug in 
> *org.apache.phoenix.jdbc.PhoenixDatabaseMetaData#*{color}*getColumns.*
> This method splices the tableName and schemaName into SQL statements to query 
> the System.catalog. but if your tableName or schemaName is lowercase,that 
> would be the *'"test"'* and *'"ods_om_om_order_test"'* so that will can not 
> query the result and then return table not found exception.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to