[ 
https://issues.apache.org/jira/browse/FALCON-1144?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14485065#comment-14485065
 ] 

Suhas Vasu commented on FALCON-1144:
------------------------------------

The {{StringUtils.repeat(String, String, int)}} method is present in 
commons-lang version 2.5 and above. We depend on commons-lang 2.6.

But hive-exec we use, bundles commons-lang 2.4, causing the classpath to mess 
up and cause the above error.

There are 3 solutions - 
1. Upgrade to commons-lang3 from 2.6; the package name itself changes with this 
and this issue will be taken care of and also helps avoid such StringUtils 
clashes in future scenarios. 

2. Upgrade to hive-exec version 0.14.x from 0.13.1; from 0.14.0, hive-exec has 
a core jar that contains only the classes and not any transitive dependencies.
But not advisable as we need sufficient tests on using hive-exec version 0.14.x

3. The problem is in using StringUtils.repeat, hence change it to a custom 
function for the time-being.
Short term fix. The same issue may arise in some other function further down 
the line.

I would prefer solution-1.

If any one has any other solutions, would be open to suggestions.

> Dynamic partitions not getting registered in Hcat
> -------------------------------------------------
>
>                 Key: FALCON-1144
>                 URL: https://issues.apache.org/jira/browse/FALCON-1144
>             Project: Falcon
>          Issue Type: Bug
>    Affects Versions: 0.6.1
>         Environment: QA
>            Reporter: Pragya Mittal
>            Assignee: Suhas Vasu
>             Fix For: 0.6.1
>
>
> While registering dynamic partion in Hcat for a process, 
> java.lang.NoSuchMethodError is thrown. Below is the stacktrace :
> {code}
> 2015-04-07 13:46:21,224 INFO  - [ActiveMQ Session Task:] ~ Creating HCatalog 
> client object for metastore thrift://192.168.138.200:9083 using conf 
> Configuration: core-default.xml, core-site.xml, mapred-default.xml, 
> mapred-site.xml, yarn-default.xml, yarn-site.xml, hdfs-default.xml, 
> hdfs-site.xml (HiveCatalogService:85)
> 2015-04-07 13:46:21,274 INFO  - [ActiveMQ Session Task:] ~ Trying to connect 
> to metastore with URI thrift://192.168.138.200:9083 (metastore:297)
> 2015-04-07 13:46:21,275 INFO  - [ActiveMQ Session Task:] ~ Connected to 
> metastore. (metastore:385)
> 2015-04-07 13:46:21,284 ERROR - [ActiveMQ Session Task:] ~ Error in listener 
> org.apache.falcon.catalog.CatalogPartitionHandler 
> (WorkflowJobEndNotificationService:104)
> java.lang.NoSuchMethodError: 
> org.apache.commons.lang.StringUtils.repeat(Ljava/lang/String;Ljava/lang/String;I)Ljava/lang/String;
>         at 
> org.apache.falcon.catalog.CatalogPartitionHandler.registerPartitions(CatalogPartitionHandler.java:181)
>         at 
> org.apache.falcon.catalog.CatalogPartitionHandler.onSuccess(CatalogPartitionHandler.java:155)
>         at 
> org.apache.falcon.workflow.WorkflowJobEndNotificationService.notifySuccess(WorkflowJobEndNotificationService.java:101)
>         at 
> org.apache.falcon.messaging.JMSMessageConsumer.onSuccess(JMSMessageConsumer.java:138)
>         at 
> org.apache.falcon.messaging.JMSMessageConsumer.onMessage(JMSMessageConsumer.java:110)
>         at 
> org.apache.activemq.ActiveMQMessageConsumer.dispatch(ActiveMQMessageConsumer.java:1229)
>         at 
> org.apache.activemq.ActiveMQSessionExecutor.dispatch(ActiveMQSessionExecutor.java:134)
>         at 
> org.apache.activemq.ActiveMQSessionExecutor.iterate(ActiveMQSessionExecutor.java:205)
>         at 
> org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTaskRunner.java:122)
>         at 
> org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskRunner.java:43)
>         at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>         at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>         at java.lang.Thread.run(Thread.java:745)
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to