You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Jiaojiao Song (JIRA)" <ji...@apache.org> on 2014/07/18 01:06:04 UTC

[jira] [Comment Edited] (DRILL-1154) Query log file failed

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

Jiaojiao Song edited comment on DRILL-1154 at 7/17/14 11:04 PM:
----------------------------------------------------------------

Hi Aditya,
I tried appending following settings in dfs's configuration

      "log" : {
      "type" : "text",
      "extensions" : [ "log" ],
      "delimiter" : " "
    }

Now I can query the log file now. Do you know how can i specify which field I want to select? I tried select TIMESTAMP and that doesn't work

0: jdbc:drill:zk=local> SELECT * FROM dfs.`/drill/apache-drill-1.0.0-m2-incubating-SNAPSHOT/log/sqlline.log` limit 10;
+------------+
|  columns   |
+------------+
| ["2014-07-16","17:18:38,558","[main]","DEBUG","o.a.drill.common.config.DrillConfig","-","Loading","configs","at","the","following","URLs","[jar:file:/dri |
| ["2014-07-16","17:18:40,967","[main]","DEBUG","o.a.d.c.l.data.LogicalOperatorBase","-","Adding","Logical","Operator","sub","types:","[class","org.apache. |
| ["2014-07-16","17:18:40,974","[main]","DEBUG","o.a.d.c.l.StoragePluginConfigBase","-","Adding","Storage","Engine","Configs","including","[class","org.apa |
| ["2014-07-16","17:18:40,978","[main]","DEBUG","o.a.d.c.l.FormatPluginConfigBase","-","Adding","Format","Plugin","Configs","including","[class","org.apach |
| ["2014-07-16","17:18:41,425","[main]","DEBUG","o.a.drill.common.config.DrillConfig","-","Loading","configs","at","the","following","URLs","[jar:file:/dri |
| ["2014-07-16","17:18:41,438","[main]","DEBUG","o.a.d.c.l.data.LogicalOperatorBase","-","Adding","Logical","Operator","sub","types:","[class","org.apache. |
| ["2014-07-16","17:18:41,439","[main]","DEBUG","o.a.d.c.l.StoragePluginConfigBase","-","Adding","Storage","Engine","Configs","including","[class","org.apa |
| ["2014-07-16","17:18:41,440","[main]","DEBUG","o.a.d.c.l.FormatPluginConfigBase","-","Adding","Format","Plugin","Configs","including","[class","org.apach |
| ["2014-07-16","17:18:41,443","[main]","DEBUG","o.a.drill.common.config.DrillConfig","-","Loading","configs","at","the","following","URLs","[jar:file:/dri |
| ["2014-07-16","17:18:41,452","[main]","DEBUG","o.a.d.c.l.data.LogicalOperatorBase","-","Adding","Logical","Operator","sub","types:","[class","org.apache. |
+------------+

0: jdbc:drill:zk=local> SELECT TIMESTAMP  FROM dfs.`/drill/apache-drill-1.0.0-m2-incubating-SNAPSHOT/log/sqlline.log` limit 1;
Query failed: org.apache.drill.exec.rpc.RpcException: Remote failure while running query.[error_id: "59561f93-50e2-4b13-a5dc-b92d30cfdc79"
endpoint {
  address: "host.com"
  user_port: 31010
  control_port: 31011
  data_port: 31012
}
error_type: 0
message: "Failure while parsing sql. < SqlParseException:[ Encountered "TIMESTAMP FROM" at line 1, column 8.
Was expecting one of:
    "UNION" ...
    "INTERSECT" ...
    "EXCEPT" ...
    "ORDER" ...
    "LIMIT" ...
    "OFFSET" ...
    "FETCH" ...
    "DISTINCT" ...
    "ALL" ...
    <IDENTIFIER> ...
   



was (Author: mavissong):
Hi Aditya,
I tried appending following settings in dfs's configuration

      "log" : {
      "type" : "text",
      "extensions" : [ "log" ],
      "delimiter" : " "
    }

Now I can query the log file now. Do you know how can i specify which field I want to select? I tried select TIMESTAMP and that doesn't work

0: jdbc:drill:zk=local> SELECT * FROM dfs.`/drill/apache-drill-1.0.0-m2-incubating-SNAPSHOT/log/sqlline.log` limit 10;
+------------+
|  columns   |
+------------+
| ["2014-07-16","17:18:38,558","[main]","DEBUG","o.a.drill.common.config.DrillConfig","-","Loading","configs","at","the","following","URLs","[jar:file:/dri |
| ["2014-07-16","17:18:40,967","[main]","DEBUG","o.a.d.c.l.data.LogicalOperatorBase","-","Adding","Logical","Operator","sub","types:","[class","org.apache. |
| ["2014-07-16","17:18:40,974","[main]","DEBUG","o.a.d.c.l.StoragePluginConfigBase","-","Adding","Storage","Engine","Configs","including","[class","org.apa |
| ["2014-07-16","17:18:40,978","[main]","DEBUG","o.a.d.c.l.FormatPluginConfigBase","-","Adding","Format","Plugin","Configs","including","[class","org.apach |
| ["2014-07-16","17:18:41,425","[main]","DEBUG","o.a.drill.common.config.DrillConfig","-","Loading","configs","at","the","following","URLs","[jar:file:/dri |
| ["2014-07-16","17:18:41,438","[main]","DEBUG","o.a.d.c.l.data.LogicalOperatorBase","-","Adding","Logical","Operator","sub","types:","[class","org.apache. |
| ["2014-07-16","17:18:41,439","[main]","DEBUG","o.a.d.c.l.StoragePluginConfigBase","-","Adding","Storage","Engine","Configs","including","[class","org.apa |
| ["2014-07-16","17:18:41,440","[main]","DEBUG","o.a.d.c.l.FormatPluginConfigBase","-","Adding","Format","Plugin","Configs","including","[class","org.apach |
| ["2014-07-16","17:18:41,443","[main]","DEBUG","o.a.drill.common.config.DrillConfig","-","Loading","configs","at","the","following","URLs","[jar:file:/dri |
| ["2014-07-16","17:18:41,452","[main]","DEBUG","o.a.d.c.l.data.LogicalOperatorBase","-","Adding","Logical","Operator","sub","types:","[class","org.apache. |
+------------+



> Query log file failed
> ---------------------
>
>                 Key: DRILL-1154
>                 URL: https://issues.apache.org/jira/browse/DRILL-1154
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Storage - Text & CSV
>    Affects Versions: 1.0.0
>         Environment: ubuntu 
>            Reporter: Jiaojiao Song
>            Priority: Critical
>
> Failed when I query a text file (.txt/ .log). But when I change the suffix of this file to '.tsv' It works.  I hear a talk and Drill claim can support log files. So I tried this and find It failed on both .txt and .log.  Is the version I'm using too old?  (apache-drill-1.0.0-m2-incubating-SNAPSHOT)
> Error messages:
> 0: jdbc:drill:zk=local> SELECT * FROM dfs.logs.`/drill/apache-drill-1.0.0-m2-incubating-SNAPSHOT/log/sqlline.log`;
> Jul 16, 2014 9:08:08 PM org.eigenbase.sql.validate.SqlValidatorException <init>
> SEVERE: org.eigenbase.sql.validate.SqlValidatorException: Table 'dfs.logs./drill/apache-drill-1.0.0-m2-incubating-SNAPSHOT/log/sqlline.log' not found
> Jul 16, 2014 9:08:08 PM org.eigenbase.util.EigenbaseException <init>
> SEVERE: org.eigenbase.util.EigenbaseContextException: From line 1, column 15 to line 1, column 17
> Query failed: org.apache.drill.exec.rpc.RpcException: Remote failure while running query.[error_id: "fe18b830-2ed7-447d-b4be-5e340e4aa488"
> endpoint {
>   address: "building-1s-dhcp69.eng.haha.com"
>   user_port: 31010
>   control_port: 31011
>   data_port: 31012
> }
> error_type: 0
> message: "Failure while parsing sql. < ValidationException:[ org.eigenbase.util.EigenbaseContextException: From line 1, column 15 to line 1, column 17 ] < EigenbaseContextException:[ From line 1, column 15 to line 1, column 17 ] < SqlValidatorException:[ Table 'dfs.logs./drill/apache-drill-1.0.0-m2-incubating-SNAPSHOT/log/sqlline.log' not found ]"
> ]
> Error: exception while executing query (state=,code=0)



--
This message was sent by Atlassian JIRA
(v6.2#6252)