camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smilevasu6 <srinivas.thu...@gmail.com>
Subject Re: Camel-Hive
Date Tue, 18 Nov 2014 07:25:10 GMT
Hi Charles ,

Thanks for such a quick response.

I am able to connect to Hive from camel. I can see the Hive table data in my
eclipse console.

But the problem is, that data i want in a file.

22:58:17.081 [Camel (camel-1) thread #1 - timer://foo] DEBUG
org.apache.camel.processor.Pipeline - Message exchange has failed: so
breaking out of pipeline for exchange: Exchange[Message: [{bd_use_id=73.0,
bd_use_number=CUSE0073}, {bd_use_id=2.0, bd_use_number=CASU2},
{bd_use_id=379.0, bd_use_number=CUSE0379}, {bd_use_id=380.0,
bd_use_number=CUSE0380}, {bd_use_id=381.0, bd_use_number=CUSE0381},
{bd_use_id=263.0, bd_use_number=CUSE0263}, {bd_use_id=264.0,
bd_use_number=CUSE0264}, {bd_use_id=314.0, bd_use_number=CUSE0314},
{bd_use_id=326.0, bd_use_number=CUSE0326}, {bd_use_id=341.0,
bd_use_number=CUSE0341}, {bd_use_id=342.0, bd_use_number=CUSE0342},
{bd_use_id=348.0, bd_use_number=CUSE0348}, {bd_use_id=17.0,
bd_use_number=CUSE0017}, {bd_use_id=354.0, bd_use_number=CUSE0354},
{bd_use_id=357.0, bd_use_number=CUSE0357}, {bd_use_id=360.0,
bd_use_number=CUSE0360}, {bd_use_id=361.0, bd_use_number=CUSE0361},
{bd_use_id=362.0, bd_use_number=CUSE0362}, {bd_use_id=365.0,
bd_use_number=CUSE0365}, {bd_use_id=372.0, bd_use_number=CUSE0372},
{bd_use_id=382.0, bd_use_number=CUSE0382}, {bd_use_id=383.0,
bd_use_number=CUSE0383}, {bd_use_id=384.0, bd_use_number=CUSE0384},
{bd_use_id=18.0, ... [Body clipped after 1000 chars, total length is 17124]]
Exception: java.sql.SQLException: Method not supported
22:58:17.094 [Camel (camel-1) thread #1 - timer://foo] WARN 
o.a.c.component.timer.TimerConsumer - Error processing exchange.
Exchange[Message: [{bd_use_id=73.0, bd_use_number=CUSE0073}, {bd_use_id=2.0,
bd_use_number=CASU2}, {bd_use_id=379.0, bd_use_number=CUSE0379},
{bd_use_id=380.0, bd_use_number=CUSE0380}, {bd_use_id=381.0,
bd_use_number=CUSE0381}, {bd_use_id=263.0, bd_use_number=CUSE0263},
{bd_use_id=264.0, bd_use_number=CUSE0264}, {bd_use_id=314.0,
bd_use_number=CUSE0314}, {bd_use_id=326.0, bd_use_number=CUSE0326},
{bd_use_id=341.0, bd_use_number=CUSE0341}, {bd_use_id=342.0,
bd_use_number=CUSE0342}, {bd_use_id=348.0, bd_use_number=CUSE0348},
{bd_use_id=17.0, bd_use_number=CUSE0017}, {bd_use_id=354.0,
bd_use_number=CUSE0354}, {bd_use_id=357.0, bd_use_number=CUSE0357},
{bd_use_id=360.0, bd_use_number=CUSE0360}, {bd_use_id=361.0,
bd_use_number=CUSE0361}, {bd_use_id=362.0, bd_use_number=CUSE0362},
{bd_use_id=365.0, bd_use_number=CUSE0365}, {bd_use_id=372.0,
bd_use_number=CUSE0372}, {bd_use_id=382.0, bd_use_number=CUSE0382},
{bd_use_id=383.0, bd_use_number=CUSE0383}, {bd_use_id=384.0,
bd_use_number=CUSE0384}, {bd_use_id=18.0, ... [Body clipped after 1000
chars, total length is 17124]]. Caused by: [java.sql.SQLException - Method
not supported]
java.sql.SQLException: Method not supported
	at org.apache.hive.jdbc.HiveConnection.commit(HiveConnection.java:508)
	at
org.apache.camel.component.jdbc.JdbcProducer.processingSqlBySettingAutoCommit(JdbcProducer.java:85)
	at
org.apache.camel.component.jdbc.JdbcProducer.process(JdbcProducer.java:66)
	at
org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)
	at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:113)
	at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:72)
	at
org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:398)
	at
org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
	at org.apache.camel.processor.Pipeline.process(Pipeline.java:118)
	at org.apache.camel.processor.Pipeline.process(Pipeline.java:80)
	at
org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
	at
org.apache.camel.component.timer.TimerConsumer.sendTimerExchange(TimerConsumer.java:166)
	at
org.apache.camel.component.timer.TimerConsumer$1.run(TimerConsumer.java:74)
	at java.util.TimerThread.mainLoop(Timer.java:555)
	at java.util.TimerThread.run(Timer.java:505)


I am getting hive data as bd_use_id=73.0, bd_use_number=CUSE0073, but when i
try to copy the data in file, i am getting the above error, Method not
supported.

My Router is 

rom("timer://foo?period=60000").
		  	setBody(constant("select bd_use_id,bd_use_number from bd_users"))
			.to("jdbc:fromdatasource")
			.convertBodyTo(String.class)
		   .to("file:/home/cloudera/Desktop/Sri")
		  .end();  

Please help me. What to do?



--
View this message in context: http://camel.465427.n5.nabble.com/Camel-Hive-tp5759189p5759233.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message