Thanks Shiran,

I tried that but get the same error (see below).

Also, strangely I couldn't create the hdfs plugin in one step by using the same 
config as the "dfs" plugin and changing the connection string. The UI says 
Invalid JSON...
I had to create the hdfs plugin in 2 steps. First using the same config as the 
dfs plugin.
Then  updated the hdfs config, by changing the connection string

After adding the hdfs plugin with the same config as dfs (but different 
connection 
string ("connection": "hdfs://10.10.10.10:9000/",) I tried this

1. Copied the file from node1 to remote HDFS 
    [alan@node1 drill]$ hdfs dfs -fs hdfs://10.10.10.10:9000/ -copyFromLocal 
~/test.par /tmp
    [alan@node1 drill]$ hdfs dfs -fs hdfs://10.10.10.10:9000/ -ls /tmp/test.par
    -rw-r--r--   1 alan supergroup    4947359 2015-05-22 08:09 /tmp/test.par

2. From drill on node1
    [alan@node1 drill]$ /opt/drill/bin/drill-localhost
    apache drill 1.0.0 
    "json ain't no thang"
    0: jdbc:drill:drillbit=localhost> use hdfs;
    +-------+-----------------------------------+
    |  ok   |              summary              |
    +-------+-----------------------------------+
    | true  | Default schema changed to [hdfs]  |
    +-------+-----------------------------------+
    1 row selected (0.422 seconds)
    0: jdbc:drill:drillbit=localhost> select * from hdfs.root.`/tmp/test.par' 
limit 5;
    Error: PARSE ERROR: Lexical error at line 1, column 55.  Encountered: <EOF> 
after : "`/tmp/test.par\' limit 5"

    [Error Id: 1f793d84-62be-4145-bfcf-2ec3da9cb021 on 
node1.mycompany.com:31010] (state=,code=0)
    0: jdbc:drill:drillbit=localhost>
    0: jdbc:drill:drillbit=localhost> !quit
    Closing: org.apache.drill.jdbc.DrillJdbc41Factory$DrillJdbc41Connection

Alan

Reply via email to