回复: sql execute failed

2016-04-26 Thread
Thank you, I didn't know this before. it is solved now .




-- 原始邮件 --
发件人: "lidong";;
发送时间: 2016年4月26日(星期二) 晚上9:22
收件人: "dev"; 

主题: Re: sql execute failed



year is a reserved keyword, try to use “YEAR”, which added the double-quotes. 
With the double-quotes, column name is case-sensitive.


More reserved words see: http://calcite.apache.org/docs/reference.html#keywords


Thanks,
Dong


Original Message
Sender:耳东775620...@qq.com
Recipient:dev...@kylin.apache.org
Date:Tuesday, Apr 26, 2016 21:12
Subject:sql execute failed


Hi all: My cube as a column named year , whose data type is integer, when I 
execute "select year from tablename", it failed. I don't konw why. Encountered 
"year" at line 1, column 8. Was expecting one of: "UNION" ... "INTERSECT" ... 
"EXCEPT" ... "ORDER" ... "LIMIT" ... "OFFSET" ... "FETCH" ... "STREAM" ... 
"DISTINCT" ... "ALL" ... "*" ... "+" ... "-" ... UNSIGNED_INTEGER_LITERAL ... 
DECIMAL_NUMERIC_LITERAL ... APPROX_NUMERIC_LITERAL ... BINARY_STRING_LITERAL 
... PREFIXED_STRING_LITERAL ... QUOTED_STRING ... UNICODE_STRING_LITERAL ... 
"TRUE" ... "FALSE" ... "UNKNOWN" ... "NULL" ... LBRACE_D ... LBRACE_T ... 
LBRACE_TS ... "DATE" ... "TIME" ... "TIMESTAMP" ... "INTERVAL" ... "?" ... 
"CAST" ... "EXTRACT" ... "POSITION" ... "CONVERT" ... "TRANSLATE" ... "OVERLAY" 
... "FLOOR" ... "CEIL" ... "CEILING" ... "SUBSTRING" ... "TRIM" ... LBRACE_FN 
... "MULTISET" ... "ARRAY" ... "SPECIFIC" ... IDENTIFIER ... QUOTED_IDENTIFIER 
... BACK_QUOTED_IDENTIFIER ... BRACKET_QUOTED_IDENTIFIER ... 
UNICODE_QUOTED_IDENTIFIER ... "ABS" ... "AVG" ... "CARDINALITY" ... 
"CHAR_LENGTH" ... "CHARACTER_LENGTH" ... "COALESCE" ... "COLLECT" ... 
"COVAR_POP" ... "COVAR_SAMP" ... "CUME_DIST" ... "COUNT" ... "CURRENT_DATE" ... 
"CURRENT_TIME" ... "CURRENT_TIMESTAMP" ... "DENSE_RANK" ... "ELEMENT" ... "EXP" 
... "FIRST_VALUE" ... "FUSION" ... "GROUPING" ... "LAST_VALUE" ... "LN" ... 
"LOCALTIME" ... "LOCALTIMESTAMP" ... "LOWER" ... "MAX" ... "MIN" ... "MOD" ... 
"NULLIF" ... "OCTET_LENGTH" ... "PERCENT_RANK" ... "POWER" ... "RANK" ... 
"REGR_SXX" ... "REGR_SYY" ... "ROW_NUMBER" ... "SQRT" ... "STDDEV_POP" ... 
"STDDEV_SAMP" ... "SUM" ... "UPPER" ... "VAR_POP" ... "VAR_SAMP" ... 
"CURRENT_CATALOG" ... "CURRENT_DEFAULT_TRANSFORM_GROUP" ... "CURRENT_PATH" ... 
"CURRENT_ROLE" ... "CURRENT_SCHEMA" ... "CURRENT_USER" ... "SESSION_USER" ... 
"SYSTEM_USER" ... "USER" ... "NEW" ... "CASE" ... "NEXT" ... "CURRENT" ... 
"CURSOR" ... "ROW" ... "NOT" ... "EXISTS" ... "(" ... at 
org.apache.kylin.rest.controller.QueryController.doQueryWithCache(QueryController.java:224)
 at 
org.apache.kylin.rest.controller.QueryController.query(QueryController.java:94) 
at sun.reflect.GeneratedMethodAccessor156.invoke(Unknown Source) at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:606) at 
org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:213)
 at 
org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:126)
 at 
org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:96)
 at 
org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:617)
 at 
org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:578)
 at 
org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:80)
 at 
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:923)
 at 
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852)
 at 
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.

回复: Re: hive table change

2016-04-22 Thread
Hi all :


This problem has been solved.
  
 In my cluster, there are two hive server, therefor there are two hive_conf 
and hive metadata. I changed the hive_conf_path in find-hive-dependency.sh and 
export the hive_conf_dir to get the metadata I want kylin to access and let 
kylin to start up hive with the metadata I prefered.








-- 原始邮件 --
发件人: "mahongbin";;
发送时间: 2016年4月22日(星期五) 下午4:28
收件人: "dev"; 

主题: Re: Re: hive table change



My explanation about hive CLI might not be accurate.

take the comment in code as reference:

# If true, job engine will not assume that hadoop CLI reside on the
same server as it self
# you will have to specify kylin.job.remote.cli.hostname,
kylin.job.remote.cli.username and kylin.job.remote.cli.password
# It should not be set to "true" unless you're NOT running Kylin.sh on
a hadoop client machine
# (Thus kylin instance has to ssh to another real hadoop client
machine to execute hbase,hive,hadoop commands)
kylin.job.run.as.remote.cmd=false

# Only necessary when kylin.job.run.as.remote.cmd=true
kylin.job.remote.cli.hostname=

# Only necessary when kylin.job.run.as.remote.cmd=true
kylin.job.remote.cli.username=

# Only necessary when kylin.job.run.as.remote.cmd=true
kylin.job.remote.cli.password=


On Fri, Apr 22, 2016 at 3:23 PM, wangxianbin1...@gmail.com <
wangxianbin1...@gmail.com> wrote:

> hi hongbin!
>
> can you give a more clear description, I can not understand "you'll find
> it helpful", did you miss something?
>
> best regards!
>
>
>
> wangxianbin1...@gmail.com
>
> 发件人: hongbin ma
> 发送时间: 2016-04-22 13:51
> 收件人: dev
> 主题: Re: 回复: hive table change
> yes, theoretically if you hive CLI does not co-exist on the server you
> deployed Kylin (which must be a hbase CLI), you'll find it helpful.
>
> However in most cases hbase CLI is also a hive CLI, then you don't have the
> problem
>
> On Fri, Apr 22, 2016 at 1:20 PM, wangxianbin1...@gmail.com <
> wangxianbin1...@gmail.com> wrote:
>
> > hi all!
> >
> > thanks hongbin & dong help to clarify this.
> >
> > just one more thing need to be confirmed, kylin.job.remote.cli.hostname
> > CLI(which can be remote) seem like will be used for create intermediate
> > flat table, not just for dev use, right?
> >
> > best regards!
> >
> >
> >
> > wangxianbin1...@gmail.com
> >
> > 发件人: Dong Li
> > 发送时间: 2016-04-22 10:35
> > 收件人: dev
> > 主题: 回复: 回复: hive table change
> > Hello,
> >
> >
> > Try to set env var HIVE_CONF_DIR and HIVE_CONF before start kylin
> service:
> >
> >
> > bin/kylin.sh stop
> > export HIVE_CONF_DIR=The real conf path kylin want to access
> > export HIVE_CONF=The real conf path kylin want to access
> > bin/kylin.sh start
> >
> >
> > Thanks,
> > Dong Li
> >
> >
> > Original Message
> > Sender:耳东775620...@qq.com
> > Recipient:dev...@kylin.apache.org
> > Date:Thursday, Apr 21, 2016 19:04
> > Subject:回复: 回复: hive table change
> >
> >
> > yes,as you said Kylin see the same tables as the hive shell in the
> server.
> > however in my cluster there is another app which invoke hive and create
> > some hive tables, of which the metadata and store location is different
> > from the hive shell. how can i make the kylin to access these tables?
> > -- 原始邮件 -- 发件人: "hongbin ma";
> > mahong...@apache.org; 发送时间: 2016年4月21日(星期四) 晚上6:31 收件人: "dev"
> > dev@kylin.apache.org; 主题: Re: 回复: hive table change I want to clarify
> > that kylin.job.remote.cli.hostname is usually used for developing
> purpose,
> > it's not related to hive table syncing. The way how Kylin gets aware of
> > hive table is through HCatlog. When kylin starts, it will look for hive
> > settings where Kylin resides to initialize HCatlog. So basically kylin
> will
> > see same tables as the hive shell in the that server. On Thu, Apr 21,
> 2016
> > at 3:20 PM, wangxianbin1...@gmail.com  wangxianbin1...@gmail.com wrote:
> > hi!   for clarifying, hive can deploy in remote mode, kylin access it by
> > "SSHClient"   best regards!wangxianbin1...@gmail.com   发件人: 耳东
> 发送时间:
> > 2016-04-21 14:57  收件人: dev  主题: 回复: hive table change  How does kylin
> > access the hive table , where can I configure to change the  hive
> metadata
> > kylin access.  -- 原始邮件 --  发件人: "
> > wangxianbin1...@gmail.com";wangxianbin1...@gmail.com;  发送时间:
> > 2016年4月21日(星期四) 中午1:19  收件人: "dev"dev@kylin.apache.o