Reply
Contributor
Posts: 49
Registered: ‎07-26-2016

Hive not responding for Twitter analysis

Hi Hadoopians,

 

I have Querry on Hive,

I Configured the Twitter.conf file using Flume I ingested Twitter data in HDFS,

Data is presented in HDFS,

Now My plan is to do some analytics on Twitter data

For this I Created a table:

 

create external table load_tweets(id BIGINT,text STRING) ROW FORMAT SERDE 'com.cloudera.hive.serde.JSONSerDe' LOCATION '/user/cloudera/flume/twitter'

 

 

Table Created Successfully.

 

After that when I used to see the Data

Below Errors I am facing ?

 2016-11-01_0527.png
 
Please Help me to sort out this issue.
 
Thanks,
Syam.
Contributor
Posts: 49
Registered: ‎07-26-2016

Re: Hive not responding for Twitter analysis

Complete log :

 

Fetching results ran into the following error(s):

Bad status for request TFetchResultsReq(fetchType=0, operationHandle=TOperationHandle(hasResultSet=True, modifiedRowCount=None, operationType=0, operationId=THandleIdentifier(secret='\xcd |?8(E\xdc\xb3\x10\xaa-\x19\x13* ', guid='\xaf?,\xa4Q\xb0A7\x94\xaa\x00 S\x0b\x88\xad')), orientation=4, maxRows=100): TFetchResultsResp(status=TStatus(errorCode=0, errorMessage="java.io.IOException: org.apache.hadoop.hive.serde2.SerDeException: org.codehaus.jackson.JsonParseException: Unexpected character ('O' (code 79)): expected a valid value (number, String, array, object, 'true', 'false' or 'null')\n at [Source: java.io.StringReader@7d14527f; line: 1, column: 2]", sqlState=None, infoMessages=["*org.apache.hive.service.cli.HiveSQLException:java.io.IOException: org.apache.hadoop.hive.serde2.SerDeException: org.codehaus.jackson.JsonParseException: Unexpected character ('O' (code 79)): expected a valid value (number, String, array, object, 'true', 'false' or 'null')\n at [Source: java.io.StringReader@7d14527f; line: 1, column: 2]:25:24", 'org.apache.hive.service.cli.operation.SQLOperation:getNextRowSet:SQLOperation.java:366', 'org.apache.hive.service.cli.operation.OperationManager:getOperationNextRowSet:OperationManager.java:275', 'org.apache.hive.service.cli.session.HiveSessionImpl:fetchResults:HiveSessionImpl.java:752', 'sun.reflect.GeneratedMethodAccessor18:invoke::-1', 'sun.reflect.DelegatingMethodAccessorImpl:invoke:DelegatingMethodAccessorImpl.java:43', 'java.lang.reflect.Method:invoke:Method.java:606', 'org.apache.hive.service.cli.session.HiveSessionProxy:invoke:HiveSessionProxy.java:78', 'org.apache.hive.service.cli.session.HiveSessionProxy:access$000:HiveSessionProxy.java:36', 'org.apache.hive.service.cli.session.HiveSessionProxy$1:run:HiveSessionProxy.java:63', 'java.security.AccessController:doPrivileged:AccessController.java:-2', 'javax.security.auth.Subject:doAs:Subject.java:415', 'org.apache.hadoop.security.UserGroupInformation:doAs:UserGroupInformation.java:1693', 'org.apache.hive.service.cli.session.HiveSessionProxy:invoke:HiveSessionProxy.java:59', 'com.sun.proxy.$Proxy25:fetchResults::-1', 'org.apache.hive.service.cli.CLIService:fetchResults:CLIService.java:438', 'org.apache.hive.service.cli.thrift.ThriftCLIService:FetchResults:ThriftCLIService.java:692', 'org.apache.hive.service.cli.thrift.TCLIService$Processor$FetchResults:getResult:TCLIService.java:1553', 'org.apache.hive.service.cli.thrift.TCLIService$Processor$FetchResults:getResult:TCLIService.java:1538', 'org.apache.thrift.ProcessFunction:process:ProcessFunction.java:39', 'org.apache.thrift.TBaseProcessor:process:TBaseProcessor.java:39', 'org.apache.hive.service.auth.TSetIpAddressProcessor:process:TSetIpAddressProcessor.java:56', 'org.apache.thrift.server.TThreadPoolServer$WorkerProcess:run:TThreadPoolServer.java:285', 'java.util.concurrent.ThreadPoolExecutor:runWorker:ThreadPoolExecutor.java:1145', 'java.util.concurrent.ThreadPoolExecutor$Worker:run:ThreadPoolExecutor.java:615', 'java.lang.Thread:run:Thread.java:745', "*java.io.IOException:org.apache.hadoop.hive.serde2.SerDeException: org.codehaus.jackson.JsonParseException: Unexpected character ('O' (code 79)): expected a valid value (number, String, array, object, 'true', 'false' or 'null')\n at [Source: java.io.StringReader@7d14527f; line: 1, column: 2]:29:4", 'org.apache.hadoop.hive.ql.exec.FetchOperator:getNextRow:FetchOperator.java:507', 'org.apache.hadoop.hive.ql.exec.FetchOperator:pushRow:FetchOperator.java:414', 'org.apache.hadoop.hive.ql.exec.FetchTask:fetch:FetchTask.java:138', 'org.apache.hadoop.hive.ql.Driver:getResults:Driver.java:1790', 'org.apache.hive.service.cli.operation.SQLOperation:getNextRowSet:SQLOperation.java:361', "*org.apache.hadoop.hive.serde2.SerDeException:org.codehaus.jackson.JsonParseException: Unexpected character ('O' (code 79)): expected a valid value (number, String, array, object, 'true', 'false' or 'null')\n at [Source: java.io.StringReader@7d14527f; line: 1, column: 2]:30:1", 'com.cloudera.hive.serde.JSONSerDe:deserialize:JSONSerDe.java:128', 'org.apache.hadoop.hive.ql.exec.FetchOperator:getNextRow:FetchOperator.java:488', "*org.codehaus.jackson.JsonParseException:Unexpected character ('O' (code 79)): expected a valid value (number, String, array, object, 'true', 'false' or 'null')\n at [Source: java.io.StringReader@7d14527f; line: 1, column: 2]:38:8", 'org.codehaus.jackson.JsonParser:_constructError:JsonParser.java:1291', 'org.codehaus.jackson.impl.JsonParserMinimalBase:_reportError:JsonParserMinimalBase.java:385', 'org.codehaus.jackson.impl.JsonParserMinimalBase:_reportUnexpectedChar:JsonParserMinimalBase.java:306', 'org.codehaus.jackson.impl.ReaderBasedParser:_handleUnexpectedValue:ReaderBasedParser.java:630', 'org.codehaus.jackson.impl.ReaderBasedParser:nextToken:ReaderBasedParser.java:364', 'org.codehaus.jackson.map.ObjectMapper:_initForReading:ObjectMapper.java:2439', 'org.codehaus.jackson.map.ObjectMapper:_readMapAndClose:ObjectMapper.java:2396', 'org.codehaus.jackson.map.ObjectMapper:readValue:ObjectMapper.java:1602', 'com.cloudera.hive.serde.JSONSerDe:deserialize:JSONSerDe.java:126'], statusCode=3), results=None, hasMoreRows=None)

 

 

Please help me,

 

Thanks.

Champion
Posts: 756
Registered: ‎05-16-2016

Re: Hive not responding for Twitter analysis

It seems the Hive metastore has not been updated or out of sync .

Could you try refershing it by firing the below command and let me know.

 

ANALYZE TABLE Your_Table_Name COMPUTE STATISTICS;

also verify if the below set variable is false or true. 

set hive.stats.autogather= 
Contributor
Posts: 49
Registered: ‎07-26-2016

Re: Hive not responding for Twitter analysis

Hi csguna,

 

Thanks for the reply,

Your command is not valid :

2016-11-03_0746.png

I have checked hive.stats.autogather variable but i didnt found in hive-site.xml file

 

Suggestions required.

 

Thanks.

 

 

Champion
Posts: 756
Registered: ‎05-16-2016

Re: Hive not responding for Twitter analysis

Please fire the command in Hive editor using Hue

 

Contributor
Posts: 49
Registered: ‎07-26-2016

Re: Hive not responding for Twitter analysis

Thanks again for the responce,

 

2016-11-03_0932.png

Champion
Posts: 756
Registered: ‎05-16-2016

Re: Hive not responding for Twitter analysis

Untitled.pngUntitledA.png

Champion
Posts: 756
Registered: ‎05-16-2016

Re: Hive not responding for Twitter analysis

You welcome mate !

Contributor
Posts: 49
Registered: ‎07-26-2016

Re: Hive not responding for Twitter analysis

Some Serde operations are missing .

How to trace ?

 

Thanks.

Champion
Posts: 756
Registered: ‎05-16-2016

Re: Hive not responding for Twitter analysis

Can u share the console output.

Announcements