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

Henning Kropp commented on CASSANDRA-5201:
------------------------------------------

I might be missing an important point, but Hadoop-Compat is nothing other than 
ContextUtil of hadoop2? It uses reflection to test what's on the classpath to 
decide how or better what to return. I made it work with just using ContextUtil 
before I found this patch here.

Therefor the binary works fine for both (btw I would not consider it legacy!), 
if you manage the dependencies on your own.

But if you would start a new project you would import Cassandra for example 
like this:
{code}
dependencies {
  ...
  compile 'org.apache.cassandra:cassandra:2.0.6'
  ...
}
{code}

What will happen now is, that this will load hadoop1 dependencies into my 
hadoop2 project for example, or not? To avoid this maven classifiers could be 
used, to call explicitly for hadoop2 dependencies:

{code}
dependencies {
  ....
  compile 'org.apache.cassandra:cassandra:2.0.6:hadoop2'
  ...
}
{code}

> Cassandra/Hadoop does not support current Hadoop releases
> ---------------------------------------------------------
>
>                 Key: CASSANDRA-5201
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-5201
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Hadoop
>    Affects Versions: 1.2.0
>            Reporter: Brian Jeltema
>            Assignee: Benjamin Coverston
>             Fix For: 2.0.6
>
>         Attachments: 5201_a.txt, hadoopCompat.patch, 
> hadoopcompat-trunk.patch, progressable-fix.patch
>
>
> Using Hadoop 0.22.0 with Cassandra results in the stack trace below.
> It appears that version 0.21+ changed org.apache.hadoop.mapreduce.JobContext
> from a class to an interface.
> Exception in thread "main" java.lang.IncompatibleClassChangeError: Found 
> interface org.apache.hadoop.mapreduce.JobContext, but class was expected
>       at 
> org.apache.cassandra.hadoop.ColumnFamilyInputFormat.getSplits(ColumnFamilyInputFormat.java:103)
>       at 
> org.apache.hadoop.mapreduce.JobSubmitter.writeNewSplits(JobSubmitter.java:445)
>       at 
> org.apache.hadoop.mapreduce.JobSubmitter.writeSplits(JobSubmitter.java:462)
>       at 
> org.apache.hadoop.mapreduce.JobSubmitter.submitJobInternal(JobSubmitter.java:357)
>       at org.apache.hadoop.mapreduce.Job$2.run(Job.java:1045)
>       at org.apache.hadoop.mapreduce.Job$2.run(Job.java:1042)
>       at java.security.AccessController.doPrivileged(Native Method)
>       at javax.security.auth.Subject.doAs(Subject.java:415)
>       at 
> org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1153)
>       at org.apache.hadoop.mapreduce.Job.submit(Job.java:1042)
>       at org.apache.hadoop.mapreduce.Job.waitForCompletion(Job.java:1062)
>       at MyHadoopApp.run(MyHadoopApp.java:163)
>       at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:69)
>       at MyHadoopApp.main(MyHadoopApp.java:82)
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>       at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>       at java.lang.reflect.Method.invoke(Method.java:601)
>       at org.apache.hadoop.util.RunJar.main(RunJar.java:192)



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to