[
https://issues.apache.org/jira/browse/DRILL-601?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13999443#comment-13999443
]
George Chow commented on DRILL-601:
-----------------------------------
I observe an anomaly in light of DRILL-623:
{code}
0: jdbc:drill:zk=local> show files in dfs.`/opt/drill`;
+------------+-------------+------------+------------+------------+------------+
| name | isDirectory | isFile | length | owner | group |
+------------+-------------+------------+------------+------------+------------+
| node-new-maprh | true | false | 4096 | root | root |
| node-new-maprh-05-13 | true | false | 4096 | root | |
| drillbit.out | false | true | 4921 | root | root |
| node-new-maprh-05-14 | true | false | 4096 | root | |
| drill-scripts | true | false | 4096 | root | root |
| node-new-maprh-05-12 | true | false | 4096 | root | |
+------------+-------------+------------+------------+------------+------------+
6 rows selected (0.311 seconds)
0: jdbc:drill:zk=local> show files in `dfs`.`default`.`/opt/drill`;
+------------+-------------+------------+------------+------------+------------+
| name | isDirectory | isFile | length | owner | group |
+------------+-------------+------------+------------+------------+------------+
| node-new-maprh | true | false | 4096 | root | root |
| node-new-maprh-05-13 | true | false | 4096 | root | |
| drillbit.out | false | true | 4921 | root | root |
| node-new-maprh-05-14 | true | false | 4096 | root | |
| drill-scripts | true | false | 4096 | root | root |
| node-new-maprh-05-12 | true | false | 4096 | root | |
+------------+-------------+------------+------------+------------+------------+
6 rows selected (0.131 seconds)
0: jdbc:drill:zk=local> show files in `dfs.default`.`/opt/drill`;
Query failed: org.apache.drill.exec.rpc.RpcException: Remote failure while
running query.[error_id: "477dd971-71bc-4bc0-a1d0-fcea4726526a"
endpoint {
address: "ubuntu"
user_port: 31013
control_port: 31014
data_port: 31015
}
error_type: 0
message: "Failure while parsing sql. < ValidationException:[ Schema not an
instance of file system schema ]"
]
Error: exception while executing query (state=,code=0)
{code}
> Need a SHOW FILES query to allow browsing of the file system.
> --------------------------------------------------------------
>
> Key: DRILL-601
> URL: https://issues.apache.org/jira/browse/DRILL-601
> Project: Apache Drill
> Issue Type: New Feature
> Reporter: Parth Chandra
> Assignee: Mehant Baid
> Attachments: DRILL-601.patch
>
>
> SHOW FILES [{FROM | IN} db_name] [LIKE 'pattern' | WHERE expr]
>
> Where -
> db_name is schema name.
> pattern is path with wildcards . The wildcard character is ‘%’
> where are other conditions.
> Example:
> SHOW FILES IN dfs.`/myfiles/logs` LIKE 'happy%' WHERE isDirectory = true;
> The columns returned are
> name VARCHAR
> isDirectory BOOLEAN
> isFile BOOLEAN
> isSymlink BOOLEAN
> length BIGINT
> owner VARCHAR
> group VARCHAR
> modificationTime TIMESTAMP
> accessTime TIMESTAMP
> permissions VARCHAR
> The syntax mirrors the show tables command
--
This message was sent by Atlassian JIRA
(v6.2#6252)