<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: how to set timestamp data type in avro schema in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/how-to-set-timestamp-data-type-in-avro-schema/m-p/121283#M84046</link>
    <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/355/bhagan.html" nodeid="355"&gt;@bhagan&lt;/A&gt; : Is timestamp a supported avro datatype? &lt;/P&gt;</description>
    <pubDate>Fri, 27 Jan 2017 22:55:10 GMT</pubDate>
    <dc:creator>arunak</dc:creator>
    <dc:date>2017-01-27T22:55:10Z</dc:date>
    <item>
      <title>how to set timestamp data type in avro schema</title>
      <link>https://community.cloudera.com/t5/Support-Questions/how-to-set-timestamp-data-type-in-avro-schema/m-p/121281#M84044</link>
      <description>&lt;P&gt;I use convertjsontoavro + puthivestreaming  processor:&lt;/P&gt;&lt;P&gt;json&lt;/P&gt;&lt;P&gt;{ "name": "张三", "num": "2", "score": "3.4", "newtime": "2016-03-01 10:10:10" }&lt;/P&gt;&lt;P&gt;avro schema&lt;/P&gt;&lt;P&gt;{ "name" : "newsInfo", "type" : "record", "fields" : [{"name" : "name", "type" : "string"}, {"name" : "num", "type" : "int"}, {"name" : "score", "type" : "double"}, {"name" : "newtime", "type" : "string"}] }&lt;/P&gt;&lt;P&gt;but got error:&lt;/P&gt;&lt;P&gt;2016-10-09 10:28:05,503 WARN [put-hive-streaming-0] org.apache.hive.hcatalog.data.JsonSerDe Error [org.codehaus.jackson.JsonParseException: Current token (VALUE_STRING) not numeric, can not use numeric value accessors&lt;/P&gt;&lt;P&gt; at [Source: java.io.ByteArrayInputStream@3c18563c; line: 1, column: 28]] parsing json text [{"name": "张三", "num": "2", "score": "3.4", "newtime": "2016-03-01 10:10:10"}].&lt;/P&gt;&lt;P&gt;2016-10-09 10:28:05,503 ERROR [Timer-Driven Process Thread-5] o.a.n.processors.hive.PutHiveStreaming PutHiveStreaming[id=d50d1499-3137-1226-89c0-86dfeac7bf2c] Error writing record to Hive Streaming transaction&lt;/P&gt;&lt;P&gt;2016-10-09 10:28:05,505 ERROR [Timer-Driven Process Thread-5] o.a.n.processors.hive.PutHiveStreaming &lt;/P&gt;&lt;P&gt;org.apache.hive.hcatalog.streaming.SerializationError: {metaStoreUri='thrift://hive1.wdp:9083', database='newsinfo', table='test1', partitionVals=[] } SerializationError&lt;/P&gt;&lt;P&gt;at org.apache.nifi.util.hive.HiveWriter.write(HiveWriter.java:119) ~[nifi-hive-processors-1.0.0.jar:1.0.0]&lt;/P&gt;&lt;P&gt;at org.apache.nifi.processors.hive.PutHiveStreaming.lambda$onTrigger$4(PutHiveStreaming.java:480) ~[nifi-hive-processors-1.0.0.jar:1.0.0]&lt;/P&gt;&lt;P&gt;at org.apache.nifi.controller.repository.StandardProcessSession.read(StandardProcessSession.java:1880) ~[na:na]&lt;/P&gt;&lt;P&gt;at org.apache.nifi.controller.repository.StandardProcessSession.read(StandardProcessSession.java:1851) ~[na:na]&lt;/P&gt;&lt;P&gt;at org.apache.nifi.processors.hive.PutHiveStreaming.onTrigger(PutHiveStreaming.java:394) ~[nifi-hive-processors-1.0.0.jar:1.0.0]&lt;/P&gt;&lt;P&gt;at org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27) ~[nifi-api-1.0.0.jar:1.0.0]&lt;/P&gt;&lt;P&gt;at org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1064) ~[na:na]&lt;/P&gt;&lt;P&gt;at org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:136) ~[na:na]&lt;/P&gt;&lt;P&gt;at org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:47) ~[na:na]&lt;/P&gt;&lt;P&gt;at org.apache.nifi.controller.scheduling.TimerDrivenSchedulingAgent$1.run(TimerDrivenSchedulingAgent.java:132) ~[na:na]&lt;/P&gt;&lt;P&gt;at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[na:1.8.0_101]&lt;/P&gt;&lt;P&gt;at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) ~[na:1.8.0_101]&lt;/P&gt;&lt;P&gt;at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) ~[na:1.8.0_101]&lt;/P&gt;&lt;P&gt;at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) ~[na:1.8.0_101]&lt;/P&gt;&lt;P&gt;at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) ~[na:1.8.0_101]&lt;/P&gt;&lt;P&gt;at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ~[na:1.8.0_101]&lt;/P&gt;&lt;P&gt;at java.lang.Thread.run(Thread.java:745) ~[na:1.8.0_101]&lt;/P&gt;&lt;P&gt;Caused by: org.apache.hive.hcatalog.streaming.SerializationError: Unable to convert byte[] record into Object&lt;/P&gt;&lt;P&gt;at org.apache.hive.hcatalog.streaming.StrictJsonWriter.encode(StrictJsonWriter.java:117) ~[hive-hcatalog-streaming-1.2.1.jar:1.2.1]&lt;/P&gt;&lt;P&gt;at org.apache.hive.hcatalog.streaming.StrictJsonWriter.write(StrictJsonWriter.java:78) ~[hive-hcatalog-streaming-1.2.1.jar:1.2.1]&lt;/P&gt;&lt;P&gt;at org.apache.hive.hcatalog.streaming.HiveEndPoint$TransactionBatchImpl.write(HiveEndPoint.java:632) ~[hive-hcatalog-streaming-1.2.1.jar:1.2.1]&lt;/P&gt;&lt;P&gt;at org.apache.nifi.util.hive.HiveWriter$1.call(HiveWriter.java:113) ~[nifi-hive-processors-1.0.0.jar:1.0.0]&lt;/P&gt;&lt;P&gt;at org.apache.nifi.util.hive.HiveWriter$1.call(HiveWriter.java:110) ~[nifi-hive-processors-1.0.0.jar:1.0.0]&lt;/P&gt;&lt;P&gt;at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[na:1.8.0_101]&lt;/P&gt;&lt;P&gt;... 3 common frames omitted&lt;/P&gt;&lt;P&gt;Caused by: org.apache.hadoop.hive.serde2.SerDeException: org.codehaus.jackson.JsonParseException: Current token (VALUE_STRING) not numeric, can not use numeric value accessors&lt;/P&gt;&lt;P&gt; at [Source: java.io.ByteArrayInputStream@3c18563c; line: 1, column: 28]&lt;/P&gt;&lt;P&gt;at org.apache.hive.hcatalog.data.JsonSerDe.deserialize(JsonSerDe.java:179) ~[hive-hcatalog-core-1.2.1.jar:1.2.1]&lt;/P&gt;&lt;P&gt;at org.apache.hive.hcatalog.streaming.StrictJsonWriter.encode(StrictJsonWriter.java:115) ~[hive-hcatalog-streaming-1.2.1.jar:1.2.1]&lt;/P&gt;&lt;P&gt;... 8 common frames omitted&lt;/P&gt;&lt;P&gt;Caused by: org.codehaus.jackson.JsonParseException: Current token (VALUE_STRING) not numeric, can not use numeric value accessors&lt;/P&gt;&lt;P&gt; at [Source: java.io.ByteArrayInputStream@3c18563c; line: 1, column: 28]&lt;/P&gt;&lt;P&gt;at org.codehaus.jackson.JsonParser._constructError(JsonParser.java:1433) ~[jackson-core-asl-1.9.13.jar:1.9.13]&lt;/P&gt;&lt;P&gt;at org.codehaus.jackson.impl.JsonParserMinimalBase._reportError(JsonParserMinimalBase.java:521) ~[jackson-core-asl-1.9.13.jar:1.9.13]&lt;/P&gt;&lt;P&gt;at org.codehaus.jackson.impl.JsonParserBase._parseNumericValue(JsonParserBase.java:766) ~[jackson-core-asl-1.9.13.jar:1.9.13]&lt;/P&gt;&lt;P&gt;at org.codehaus.jackson.impl.JsonParserBase.getIntValue(JsonParserBase.java:622) ~[jackson-core-asl-1.9.13.jar:1.9.13]&lt;/P&gt;&lt;P&gt;at org.apache.hive.hcatalog.data.JsonSerDe.extractCurrentField(JsonSerDe.java:279) ~[hive-hcatalog-core-1.2.1.jar:1.2.1]&lt;/P&gt;&lt;P&gt;at org.apache.hive.hcatalog.data.JsonSerDe.populateRecord(JsonSerDe.java:218) ~[hive-hcatalog-core-1.2.1.jar:1.2.1]&lt;/P&gt;&lt;P&gt;at org.apache.hive.hcatalog.data.JsonSerDe.deserialize(JsonSerDe.java:174) ~[hive-hcatalog-core-1.2.1.jar:1.2.1]&lt;/P&gt;&lt;P&gt;... 9 common frames omitted&lt;/P&gt;</description>
      <pubDate>Sun, 09 Oct 2016 21:30:22 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/how-to-set-timestamp-data-type-in-avro-schema/m-p/121281#M84044</guid>
      <dc:creator>121285904</dc:creator>
      <dc:date>2016-10-09T21:30:22Z</dc:date>
    </item>
    <item>
      <title>Re: how to set timestamp data type in avro schema</title>
      <link>https://community.cloudera.com/t5/Support-Questions/how-to-set-timestamp-data-type-in-avro-schema/m-p/121282#M84045</link>
      <description>&lt;P&gt;What did you use to create the avro schema. Not sure if you knew, but Nifi provides an InverAvroSchema processor, which may help define the type.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Oct 2016 03:50:37 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/how-to-set-timestamp-data-type-in-avro-schema/m-p/121282#M84045</guid>
      <dc:creator>bhagan</dc:creator>
      <dc:date>2016-10-19T03:50:37Z</dc:date>
    </item>
    <item>
      <title>Re: how to set timestamp data type in avro schema</title>
      <link>https://community.cloudera.com/t5/Support-Questions/how-to-set-timestamp-data-type-in-avro-schema/m-p/121283#M84046</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/355/bhagan.html" nodeid="355"&gt;@bhagan&lt;/A&gt; : Is timestamp a supported avro datatype? &lt;/P&gt;</description>
      <pubDate>Fri, 27 Jan 2017 22:55:10 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/how-to-set-timestamp-data-type-in-avro-schema/m-p/121283#M84046</guid>
      <dc:creator>arunak</dc:creator>
      <dc:date>2017-01-27T22:55:10Z</dc:date>
    </item>
    <item>
      <title>Re: how to set timestamp data type in avro schema</title>
      <link>https://community.cloudera.com/t5/Support-Questions/how-to-set-timestamp-data-type-in-avro-schema/m-p/121284#M84047</link>
      <description>&lt;P&gt;Arun, yes, timestamp is a supported datatype. Here is a link to the doc:&lt;/P&gt;&lt;P&gt;&lt;A href="https://avro.apache.org/docs/1.8.1/spec.html#Logical+Types" target="_blank"&gt;https://avro.apache.org/docs/1.8.1/spec.html#Logical+Types&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jan 2017 23:12:16 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/how-to-set-timestamp-data-type-in-avro-schema/m-p/121284#M84047</guid>
      <dc:creator>bhagan</dc:creator>
      <dc:date>2017-01-27T23:12:16Z</dc:date>
    </item>
    <item>
      <title>Re: how to set timestamp data type in avro schema</title>
      <link>https://community.cloudera.com/t5/Support-Questions/how-to-set-timestamp-data-type-in-avro-schema/m-p/121285#M84048</link>
      <description>&lt;P&gt;Avro in HDF is 1.7.7 and timestamp was only introduced in Avro 1.8.x. I would suggest to treat the timestamp field as string.&lt;/P&gt;</description>
      <pubDate>Sat, 28 Jan 2017 07:57:56 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/how-to-set-timestamp-data-type-in-avro-schema/m-p/121285#M84048</guid>
      <dc:creator>aervits</dc:creator>
      <dc:date>2017-01-28T07:57:56Z</dc:date>
    </item>
    <item>
      <title>Re: how to set timestamp data type in avro schema</title>
      <link>https://community.cloudera.com/t5/Support-Questions/how-to-set-timestamp-data-type-in-avro-schema/m-p/121286#M84049</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/355/bhagan.html" nodeid="355"&gt;@bhagan&lt;/A&gt; : Sorry, I was looking at if timestamp data type could be used in NiFi AVRO related processor. Unfortunately not, with NiFi 1.1.1 (the one I am using) because Avro is still 1.7 and not yet updated to 1.8 there. 
I believe this is what &lt;A rel="user" href="https://community.cloudera.com/users/393/aervits.html" nodeid="393"&gt;@Artem Ervits&lt;/A&gt; meant by his answer. &lt;/P&gt;</description>
      <pubDate>Tue, 31 Jan 2017 00:33:53 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/how-to-set-timestamp-data-type-in-avro-schema/m-p/121286#M84049</guid>
      <dc:creator>arunak</dc:creator>
      <dc:date>2017-01-31T00:33:53Z</dc:date>
    </item>
    <item>
      <title>Re: how to set timestamp data type in avro schema</title>
      <link>https://community.cloudera.com/t5/Support-Questions/how-to-set-timestamp-data-type-in-avro-schema/m-p/121287#M84050</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/11103/121285904.html" nodeid="11103"&gt;@boyer&lt;/A&gt; if that answers your question, please accept it as best.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Feb 2017 11:25:53 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/how-to-set-timestamp-data-type-in-avro-schema/m-p/121287#M84050</guid>
      <dc:creator>aervits</dc:creator>
      <dc:date>2017-02-01T11:25:53Z</dc:date>
    </item>
  </channel>
</rss>

