FWIW, I've had success doing something similar with CDH 4.4 and Phoenix 3.0.0. The steps I took were to set the hadoop-two.version property to 2.0.0-cdh4.4.0 (similar to what you've done), but leave the hbase.version property as-is. After that I build it with "mvn clean install -DskipTests -Dhadoop.profile=2", and things have worked from there on (although I haven't been running it via the Phoenix-bundled sqlline).
How are you adding the commons-collections jar to the classpath of sqlline? Based on that error it looks like it's either not being added to the classpath, or the wrong version is being added. On Wed, Jun 11, 2014 at 9:58 PM, Alex Kamil <[email protected]> wrote: > I'm trying to run phoenix 3.1 sqlline client against cluster with > hadoop-2.0.0-cdh4.6.0. after building phoenix against hadoop2 profile seeing > this error in sqlline: > > at sqlline.SqlLine.main(SqlLine.java:424) Caused by: > java.lang.NoSuchMethodError: > org.apache.hadoop.net.NetUtils.getInputStream(Ljava/net/Socket;)Ljava/io/InputStream; > at > org.apache.hadoop.hbase.ipc.HBaseClient$Connection.setupIOstreams(HBaseClient.java:439) > 14/06/11 19:26:26 INFO client.HConnectionManager$HConnectionImplementation: > getMaster attempt 8 of 14 failed; > java.io.IOException: Could not set up IO Streams > at > org.apache.hadoop.hbase.ipc.HBaseClient$Connection.setupIOstreams(HBaseClient.java:456) > > based on other threads such as Phoenix/JDBC becomes unresponsive looks like > it's due to conflict between two different versions of hadoop: hadoop-2.0.0 > which comes with phoenix and hadoop-2.0.0-cdh4.6.0 on the cluster > > to fix this I've tried to recompile phoenix with hadoop-2.0.0-cdh4.6.0 by > changing phoenix/pom.xml as shown below and rebuilding hadoop2 profile but > getting a different error, and looks like it's missing commons-collections > classes, I've tried to add common-collections and hadoop-common jar to > sqlline classpath but still getting this error, any ideas how to fix this? > > java.lang.NoClassDefFoundError: > org/apache/commons/collections/map/UnmodifiableMap > > at > org.apache.hadoop.conf.Configuration$DeprecationContext.<init>(Configuration.java:386) > > > phoenix/pom.xml changes: > > 1. add cloudera repository > > <repository> > > <id>cloudera</id> > > <url>https://repository.cloudera.com/artifactory/cloudera-repos/</url> > > </repository> > > 2. update hadoop.profile version > > <!-- Hadoop Versions --> > > <hadoop-one.version>1.0.4</hadoop-one.version> > > <!--hadoop-two.version>2.0.4-alpha</hadoop-two.version--> > > <hadoop-two.version>2.0.0-cdh4.6.0</hadoop-two.version> > > 3. update dependency versions > > <!-- Dependency versions --> > > <!--hbase.version>0.94.15</hbase.version--> > > <hbase.version>0.94.15-cdh4.6.0</hbase.version> > > <!--hadoop.version>2.0.0</hadoop.version--> > > <hadoop.version>2.0.0-cdh4.6.0</hadoop.version> > > > Thanks > > Alex
