2016-10-18 14 views
1

にHIVEに例外を発生させ、私はこのようなflowfilesを使用してputSQLプロセッサを供給しています:Nifi putSQLプロセッサは、単純な挿入

insert into test_nifi values ('1476781027812'); 

私は、最終なしバージョンを使用してみました「;」結果は同じです。

2016-10-18 10:49:58,858 ERROR [Timer-Driven Process Thread-4] o.apache.nifi.processors.standard.PutSQL PutSQL[id=d3103678-0157-1000-0000-000036cdfdbc] Failed to update database for [StandardFlow 
FileRecord[uuid=b0e562b4-e974-4262-9b0b-c968f3488da4,claim=StandardContentClaim [resourceClaim=StandardResourceClaim[id=1476666309626-4, container=default, section=4], offset=332174, length=48], 
offset=0,name=2479999684241677.avro,size=48]] due to java.sql.SQLException: Method not supported; it is possible that retrying the operation will succeed, so routing to retry: java.sql.SQLExcept 
ion: Method not supported 
2016-10-18 10:49:58,860 ERROR [Timer-Driven Process Thread-4] o.apache.nifi.processors.standard.PutSQL 
java.sql.SQLException: Method not supported 
     at org.apache.hive.jdbc.HiveConnection.commit(HiveConnection.java:614) ~[na:na] 
     at org.apache.commons.dbcp.DelegatingConnection.commit(DelegatingConnection.java:334) ~[na:na] 
     at org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.commit(PoolingDataSource.java:211) ~[na:na] 
     at org.apache.nifi.processors.standard.PutSQL.onTrigger(PutSQL.java:371) ~[nifi-standard-processors-1.0.0.jar:1.0.0] 
     at org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27) [nifi-api-1.0.0.jar:1.0.0] 
     at org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1064) [nifi-framework-core-1.0.0.jar:1.0.0] 
     at org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:136) [nifi-framework-core-1.0.0.jar:1.0.0] 
     at org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:47) [nifi-framework-core-1.0.0.jar:1.0.0] 
     at org.apache.nifi.controller.scheduling.TimerDrivenSchedulingAgent$1.run(TimerDrivenSchedulingAgent.java:132) [nifi-framework-core-1.0.0.jar:1.0.0] 
     at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_101] 
     at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [na:1.8.0_101] 

     at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [na:1.8.0_101] 
     at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [na:1.8.0_101] 
     at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [na:1.8.0_101] 
     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_101] 
     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_101] 
     at java.lang.Thread.run(Thread.java:745) [na:1.8.0_101] 

SelectHiveQLプロセッサは問題なく動作します。 putSQLが壊れている場合(少なくともハイブに)データを返さないSQLコードをどのように実行できますか?

私はデータを挿入してい表のように定義されているApacheのハイブ(バージョン1.1.0-cdh5.5.2)

に接続している:belineeからインサートが働いている

CREATE TABLE `test_nifi`(
    `value` string) 
ROW FORMAT SERDE 
    'org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' 
STORED AS INPUTFORMAT 
    'org.apache.hadoop.mapred.TextInputFormat' 
OUTPUTFORMAT 
    'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' 
LOCATION 
    'hdfs://hdfs-prod/user/hive/warehouse/unifieddata.db/test_nifi'; 

答えて

2

私は自分で解決しました。正しいプロセッサはPutHiveQLです。P

関連する問題