Make sure the transactional jar is in your CLASSPATH. Make sure you started a transactional cluster rather than a straight hbase cluster: see http://hadoop.apache.org/hbase/docs/r0.20.2/api/org/apache/hadoop/hbase/client/transactional/package-summary.html#package_descriptionif you haven't already.
St.Ack On Sat, Jan 2, 2010 at 9:56 AM, Naresh Rapolu <[email protected]> wrote: > Hello, > > I get the following exception originating at line no 6 of the code snippet > below. > --------------------------------------------------------- > Exception in thread "main" java.lang.UnsupportedOperationException: Unable > to > find region server interface > org.apache.hadoop.hbase.ipc.TransactionalRegionInterface > at > > org.apache.hadoop.hbase.client.HConnectionManager$TableServers.<init>(HConnectio > nManager.java:267) > at > > org.apache.hadoop.hbase.client.HConnectionManager.getConnection(HConnectionManag > er.java:99) > at > org.apache.hadoop.hbase.client.HBaseAdmin.<init>(HBaseAdmin.java:68) > at hbase.TransTableTest.main(TransTableTest.java:50) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav > a:25) > at java.lang.reflect.Method.invoke(Method.java:597) > at org.apache.hadoop.util.RunJar.main(RunJar.java:156) > Caused by: java.lang.ClassNotFoundException: > org.apache.hadoop.hbase.ipc.TransactionalRegionInterface > at java.net.URLClassLoader$1.run(URLClassLoader.java:200) > at java.security.AccessController.doPrivileged(Native Method) > at java.net.URLClassLoader.findClass(URLClassLoader.java:188) > at java.lang.ClassLoader.loadClass(ClassLoader.java:306) > at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276) > at java.lang.ClassLoader.loadClass(ClassLoader.java:251) > at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Class.java:169) > at > > org.apache.hadoop.hbase.client.HConnectionManager$TableServers.<init>(HConnectio > nManager.java:263) > > ------------------------------------------------------ > Error occurs at line 6. of the code below. > > > 1. HBaseConfiguration conf = new HBaseConfiguration(); > 2. conf.set(HConstants.REGION_SERVER_CLASS, > TransactionalRegionInterface.class > .getName()); > 3. conf.set(HConstants.REGION_SERVER_IMPL, TransactionalRegionServer.class > .getName()); > > > 4. HTableDescriptor desc = new HTableDescriptor("testTable"); > 5. desc.addFamily(new HColumnDescriptor("testFamily")); > 6. HBaseAdmin admin = new HBaseAdmin(conf); > 7. admin.createTable(desc); > > -------------------------------------------------------- > > Can I simply use src/contrib/transactional packages during compilation of > my > application code ? > What other steps are required to use the transactional package ? > > Iam using HBase-0.20.1 over hadoop-0.20.1 > > Thanks, > Naresh. >
