spring-attic / spring-hadoop-samples

Spring Hadoop Samples
Apache License 2.0
492 stars 466 forks source link

I need a SpringBatch Hive 13, HiverServer2 sample #19

Open sagpid opened 10 years ago

sagpid commented 10 years ago

I posted a message earlier on this board and it got deleted and so posting again.

I down loaded the samples and modified some of them for Hive13, hadoop 2.4.1 (hrtonworks 2.1). Please take aa look and see if you can help in spotting the problem. Or Do you have a project that works for hive13 on Hiveserver2.

Thanks for any help.

I get the following error

[sagar@devsagar hive]$ sh ./target/appassembler/bin/hiveApp
00:47:15,902  INFO t.support.ClassPathXmlApplicationContext: 513 - Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@5ab2f56: startup date [Wed Aug 20 00:47:15 CEST 2014]; root of context hierarchy
00:47:16,057  INFO eans.factory.xml.XmlBeanDefinitionReader: 316 - Loading XML bean definitions from class path resource [META-INF/spring/hive-context.xml]
00:47:16,449  INFO eans.factory.xml.XmlBeanDefinitionReader: 316 - Loading XML bean definitions from class path resource [META-INF/spring/jdbc-context.xml]
00:47:16,889  INFO ort.PropertySourcesPlaceholderConfigurer: 172 - Loading properties file from class path resource [hadoop.properties]
00:47:16,890  INFO ort.PropertySourcesPlaceholderConfigurer: 172 - Loading properties file from class path resource [hive.properties]
00:47:16,898  INFO ion.AutowiredAnnotationBeanPostProcessor: 141 - JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
00:47:17,433  INFO ans.factory.config.PropertiesFactoryBean: 172 - Loading properties file from class path resource [hive-server.properties]
Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hiveServer': Invocation of init method failed; nested exception is org.apache.thrift.transport.TTransportException: Could not create ServerSocket on address 0.0.0.0/0.0.0.0:10000.
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1553)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539)
sagpid commented 10 years ago

hive.exec.drop.ignorenonexistent=true

hive.port=10000
#hive.url=jdbc:hive2://${hive.host}:${hive.port}/default;auth=noSasl
hive.table=passwords
flowers2023 commented 9 years ago

HI, when i run this command: [root@drunk hive]# sudo -u hive sh ./target/appassembler/bin/hiveApp 04:04:45,672 INFO t.support.ClassPathXmlApplicationContext: 513 - Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@15e337bf: startup date [Mon May 04 04:04:45 PDT 2015]; root of context hierarchy 04:04:45,965 INFO eans.factory.xml.XmlBeanDefinitionReader: 316 - Loading XML bean definitions from class path resource [META-INF/spring/hive-context.xml] 04:04:47,186 INFO eans.factory.xml.XmlBeanDefinitionReader: 316 - Loading XML bean definitions from class path resource [META-INF/spring/jdbc-context.xml] 04:04:48,267 INFO ort.PropertySourcesPlaceholderConfigurer: 172 - Loading properties file from class path resource [hadoop.properties] 04:04:48,271 INFO ort.PropertySourcesPlaceholderConfigurer: 172 - Loading properties file from class path resource [hive.properties] 04:04:48,303 INFO ion.AutowiredAnnotationBeanPostProcessor: 141 - JSR-330 'javax.inject.Inject' annotation found and supported for autowiring 04:04:49,551 INFO ans.factory.config.PropertiesFactoryBean: 172 - Loading properties file from class path resource [hive-server.properties] 04:04:58,357 INFO ontext.support.DefaultLifecycleProcessor: 341 - Starting beans in phase -2147483648 04:04:58,369 INFO ingframework.samples.hadoop.hive.HiveApp: 31 - Hive Application Running 04:04:58,369 INFO ingframework.samples.hadoop.hive.HiveApp: 32 - 000000000000000000 04:04:58,369 INFO ingframework.samples.hadoop.hive.HiveApp: 34 - Here......................... 04:04:58,369 INFO ingframework.samples.hadoop.hive.HiveApp: 36 - show tables...................

This is stop in template.query("show tables");
log.info("show tables..................."); template.query("show tables");
log.info("show tables end..............");

Can you give some suggest, god bless you,