You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by "Sebastien Rainville (JIRA)" <ji...@apache.org> on 2008/07/10 23:28:31 UTC

[jira] Created: (HBASE-739) HBaseAdmin.createTable() using old HTableDescription doesn't work

HBaseAdmin.createTable() using old HTableDescription doesn't work
-----------------------------------------------------------------

                 Key: HBASE-739
                 URL: https://issues.apache.org/jira/browse/HBASE-739
             Project: Hadoop HBase
          Issue Type: Bug
          Components: client
    Affects Versions: 0.2.0
            Reporter: Sebastien Rainville
            Priority: Minor


The following test case (see below) illustrate what used to work in branch 0.1 and that doesn't anymore. testTruncateInTrunk() shows how I got it to work again. I get this error now when trying the old code but using trunk:

java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at com.openplaces.test.fixture.FixtureLoader.truncateHbaseTable(FixtureLoader.java:105)
	at com.openplaces.test.fixture.FixtureLoader.loadHbaseFixtures(FixtureLoader.java:63)
	at com.openplaces.test.fixture.TestCaseWithFixtures.hbaseFixtures(TestCaseWithFixtures.java:34)
	at com.openplaces.test.isolated.TestSearchSRFIEF.setUp(TestSearchSRFIEF.java:37)
	at junit.framework.TestCase.runBare(TestCase.java:125)
	at junit.framework.TestResult$1.protect(TestResult.java:106)
	at junit.framework.TestResult.runProtected(TestResult.java:124)
	at junit.framework.TestResult.run(TestResult.java:109)
	at junit.framework.TestCase.run(TestCase.java:118)
	at junit.framework.TestSuite.runTest(TestSuite.java:208)
	at junit.framework.TestSuite.run(TestSuite.java:203)
	at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Caused by: java.net.SocketTimeoutException: timed out waiting for rpc response
	at org.apache.hadoop.ipc.Client.call(Client.java:559)
	at org.apache.hadoop.hbase.ipc.HbaseRPC$Invoker.invoke(HbaseRPC.java:211)
	at $Proxy5.createTable(Unknown Source)
	at org.apache.hadoop.hbase.client.HBaseAdmin.createTableAsync(HBaseAdmin.java:184)
	at org.apache.hadoop.hbase.client.HBaseAdmin.createTable(HBaseAdmin.java:144)
	at com.openplaces.util.hbaserecord.connectionadapters.HbaseAdapter.truncateTable(HbaseAdapter.java:502)
	at com.openplaces.util.hbaserecord.Base$Singleton.truncate(Base.java:609)
	... 21 more




import java.io.IOException;
import java.util.Collection;

import org.apache.hadoop.hbase.HBaseConfiguration;
import org.apache.hadoop.hbase.HColumnDescriptor;
import org.apache.hadoop.hbase.HTableDescriptor;
import org.apache.hadoop.hbase.client.HBaseAdmin;
import org.apache.hadoop.hbase.client.HTable;

import junit.framework.TestCase;

@SuppressWarnings("deprecation")
public class TestTruncate extends TestCase {

	public void testTruncateInBranch_0_1() throws IOException{
		HTable table = new HTable("mytable");
		HBaseAdmin admin = new HBaseAdmin(new HBaseConfiguration());
		HTableDescriptor tableDesc = table.getMetadata();
		admin.deleteTable(table.getTableName());
		admin.createTable(tableDesc);
	}

	public void testTruncateInTrunk() throws IOException{
		HTable table = new HTable("mytable");
		HBaseAdmin admin = new HBaseAdmin(new HBaseConfiguration());
		Collection<HColumnDescriptor> families = table.getMetadata().getFamilies();
		
		HTableDescriptor tableDesc = new HTableDescriptor(table.getTableName());
		for(HColumnDescriptor family : families){
			tableDesc.addFamily(family);
		}

		admin.deleteTable(table.getTableName());
		admin.createTable(tableDesc);
	}
}


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HBASE-739) HBaseAdmin.createTable() using old HTableDescription doesn't work

Posted by "stack (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-739?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12613454#action_12613454 ] 

stack commented on HBASE-739:
-----------------------------

Applied Izaaks second patch (Thanks Izaak).

> HBaseAdmin.createTable() using old HTableDescription doesn't work
> -----------------------------------------------------------------
>
>                 Key: HBASE-739
>                 URL: https://issues.apache.org/jira/browse/HBASE-739
>             Project: Hadoop HBase
>          Issue Type: Bug
>          Components: client
>    Affects Versions: 0.2.0
>            Reporter: Sebastien Rainville
>            Assignee: Izaak Rubin
>            Priority: Minor
>         Attachments: hbase-739.patch, hbase-739_v2.patch, master.log, TEST-org.apache.hadoop.hbase.TestTruncateIsaak.txt, TestHbase739.java, TestTruncate2.java
>
>
> The following test case (see below) illustrate what used to work in branch 0.1 and that doesn't anymore. testTruncateInTrunk() shows how I got it to work again. I get this error now when trying the old code but using trunk:
> java.lang.reflect.InvocationTargetException
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:597)
> 	at com.openplaces.test.fixture.FixtureLoader.truncateHbaseTable(FixtureLoader.java:105)
> 	at com.openplaces.test.fixture.FixtureLoader.loadHbaseFixtures(FixtureLoader.java:63)
> 	at com.openplaces.test.fixture.TestCaseWithFixtures.hbaseFixtures(TestCaseWithFixtures.java:34)
> 	at com.openplaces.test.isolated.TestSearchSRFIEF.setUp(TestSearchSRFIEF.java:37)
> 	at junit.framework.TestCase.runBare(TestCase.java:125)
> 	at junit.framework.TestResult$1.protect(TestResult.java:106)
> 	at junit.framework.TestResult.runProtected(TestResult.java:124)
> 	at junit.framework.TestResult.run(TestResult.java:109)
> 	at junit.framework.TestCase.run(TestCase.java:118)
> 	at junit.framework.TestSuite.runTest(TestSuite.java:208)
> 	at junit.framework.TestSuite.run(TestSuite.java:203)
> 	at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
> 	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
> Caused by: java.net.SocketTimeoutException: timed out waiting for rpc response
> 	at org.apache.hadoop.ipc.Client.call(Client.java:559)
> 	at org.apache.hadoop.hbase.ipc.HbaseRPC$Invoker.invoke(HbaseRPC.java:211)
> 	at $Proxy5.createTable(Unknown Source)
> 	at org.apache.hadoop.hbase.client.HBaseAdmin.createTableAsync(HBaseAdmin.java:184)
> 	at org.apache.hadoop.hbase.client.HBaseAdmin.createTable(HBaseAdmin.java:144)
> 	at com.openplaces.util.hbaserecord.connectionadapters.HbaseAdapter.truncateTable(HbaseAdapter.java:502)
> 	at com.openplaces.util.hbaserecord.Base$Singleton.truncate(Base.java:609)
> 	... 21 more
> import java.io.IOException;
> import java.util.Collection;
> import org.apache.hadoop.hbase.HBaseConfiguration;
> import org.apache.hadoop.hbase.HColumnDescriptor;
> import org.apache.hadoop.hbase.HTableDescriptor;
> import org.apache.hadoop.hbase.client.HBaseAdmin;
> import org.apache.hadoop.hbase.client.HTable;
> import junit.framework.TestCase;
> @SuppressWarnings("deprecation")
> public class TestTruncate extends TestCase {
> 	public void testTruncateInBranch_0_1() throws IOException{
> 		HTable table = new HTable("mytable");
> 		HBaseAdmin admin = new HBaseAdmin(new HBaseConfiguration());
> 		HTableDescriptor tableDesc = table.getMetadata();
> 		admin.deleteTable(table.getTableName());
> 		admin.createTable(tableDesc);
> 	}
> 	public void testTruncateInTrunk() throws IOException{
> 		HTable table = new HTable("mytable");
> 		HBaseAdmin admin = new HBaseAdmin(new HBaseConfiguration());
> 		Collection<HColumnDescriptor> families = table.getMetadata().getFamilies();
> 		
> 		HTableDescriptor tableDesc = new HTableDescriptor(table.getTableName());
> 		for(HColumnDescriptor family : families){
> 			tableDesc.addFamily(family);
> 		}
> 		admin.deleteTable(table.getTableName());
> 		admin.createTable(tableDesc);
> 	}
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Issue Comment Edited: (HBASE-739) HBaseAdmin.createTable() using old HTableDescription doesn't work

Posted by "Izaak Rubin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-739?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12613442#action_12613442 ] 

irubin edited comment on HBASE-739 at 7/14/08 1:24 PM:
------------------------------------------------------------

I think I've really fixed it this time.  I added a default constructor to UnmodifyableHTableDescriptor, which I should have done in the last patch (this all goes in the same vein of making UnmodifyableHTableDescriptor serializable).  

I found that Eclipse really confused the testing process - I definitely ran the test with and without the default constructor, sometimes succeeding and sometimes failing.  Running the test on the command-line was much more useful and straightforward, and I'd recommend doing that instead (at least for this test).  Here's how you can run just that test on the command-line:

Add the following to your build.xml:

{code}
<target name="ensure-test-name" unless="test">
  <fail message="You must run this target with -Dtest=TestName"/>
</target>

<target name="runtest" description="Runs the test you specify on the command line with -Dtest=" depends="compile, ensure-test-name">
  <junit printsummary="withOutAndErr" fork="yes"> 
    <classpath refid="test.classpath" />
    <formatter type="plain" usefile="false"/>
    <batchtest>
      <fileset dir="${src.test}">
        <include name="**/${test}.java"/>
      </fileset>
    </batchtest>
  </junit>
</target>
{code}

Start HBase, make sure TestHbase739.java is added, "mytable" exists, etc, and then enter:

{code}
ant clean jar compile-test runtest -Dtest=TestHbase739
{code}

Without the attached patch, hbase-739_v2.patch, this should fail (it might say "Build Successful", but check the actual junit output).  After adding the attached patch, this should succeed (at least it did for me, when doing this process on a fresh copy of HBase).  

Let me know if this is still generating errors.

      was (Author: irubin):
    I think I've really fixed it this time.  I added a default constructor to UnmodifyableHTableDescriptor, which I should have done in the last patch (this all goes in the same vein of making UnmodifyableHTableDescriptor serializable).  

I found that Eclipse really confused the testing process - I had definitely run the test with and without the default constructor, sometimes succeeding and sometimes failing.  Running the test on the command-line was much more useful and straightforward, and I'd recommend doing that instead (at least for this test).  Here's how you can run just that test on the command-line:

Add the following to your build.xml:

{code}
<target name="ensure-test-name" unless="test">
  <fail message="You must run this target with -Dtest=TestName"/>
</target>

<target name="runtest" description="Runs the test you specify on the command line with -Dtest=" depends="compile, ensure-test-name">
  <junit printsummary="withOutAndErr" fork="yes"> 
    <classpath refid="test.classpath" />
    <formatter type="plain" usefile="false"/>
    <batchtest>
      <fileset dir="${src.test}">
        <include name="**/${test}.java"/>
      </fileset>
    </batchtest>
  </junit>
</target>
{code}

Start HBase, make sure TestHbase739.java is added, "mytable" exists, etc, and then enter:

{code}
ant clean jar compile-test runtest -Dtest=TestHbase739
{code}

Without the attached patch, hbase-739_v2.patch, this should fail (it might say "Build Successful", but check the actual junit output).  After adding the attached patch, this should succeed (at least it did for me, when doing this process on a fresh copy of HBase).  

Let me know if this is still generating errors.
  
> HBaseAdmin.createTable() using old HTableDescription doesn't work
> -----------------------------------------------------------------
>
>                 Key: HBASE-739
>                 URL: https://issues.apache.org/jira/browse/HBASE-739
>             Project: Hadoop HBase
>          Issue Type: Bug
>          Components: client
>    Affects Versions: 0.2.0
>            Reporter: Sebastien Rainville
>            Assignee: Izaak Rubin
>            Priority: Minor
>         Attachments: hbase-739.patch, hbase-739_v2.patch, master.log, TEST-org.apache.hadoop.hbase.TestTruncateIsaak.txt, TestHbase739.java, TestTruncate2.java
>
>
> The following test case (see below) illustrate what used to work in branch 0.1 and that doesn't anymore. testTruncateInTrunk() shows how I got it to work again. I get this error now when trying the old code but using trunk:
> java.lang.reflect.InvocationTargetException
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:597)
> 	at com.openplaces.test.fixture.FixtureLoader.truncateHbaseTable(FixtureLoader.java:105)
> 	at com.openplaces.test.fixture.FixtureLoader.loadHbaseFixtures(FixtureLoader.java:63)
> 	at com.openplaces.test.fixture.TestCaseWithFixtures.hbaseFixtures(TestCaseWithFixtures.java:34)
> 	at com.openplaces.test.isolated.TestSearchSRFIEF.setUp(TestSearchSRFIEF.java:37)
> 	at junit.framework.TestCase.runBare(TestCase.java:125)
> 	at junit.framework.TestResult$1.protect(TestResult.java:106)
> 	at junit.framework.TestResult.runProtected(TestResult.java:124)
> 	at junit.framework.TestResult.run(TestResult.java:109)
> 	at junit.framework.TestCase.run(TestCase.java:118)
> 	at junit.framework.TestSuite.runTest(TestSuite.java:208)
> 	at junit.framework.TestSuite.run(TestSuite.java:203)
> 	at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
> 	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
> Caused by: java.net.SocketTimeoutException: timed out waiting for rpc response
> 	at org.apache.hadoop.ipc.Client.call(Client.java:559)
> 	at org.apache.hadoop.hbase.ipc.HbaseRPC$Invoker.invoke(HbaseRPC.java:211)
> 	at $Proxy5.createTable(Unknown Source)
> 	at org.apache.hadoop.hbase.client.HBaseAdmin.createTableAsync(HBaseAdmin.java:184)
> 	at org.apache.hadoop.hbase.client.HBaseAdmin.createTable(HBaseAdmin.java:144)
> 	at com.openplaces.util.hbaserecord.connectionadapters.HbaseAdapter.truncateTable(HbaseAdapter.java:502)
> 	at com.openplaces.util.hbaserecord.Base$Singleton.truncate(Base.java:609)
> 	... 21 more
> import java.io.IOException;
> import java.util.Collection;
> import org.apache.hadoop.hbase.HBaseConfiguration;
> import org.apache.hadoop.hbase.HColumnDescriptor;
> import org.apache.hadoop.hbase.HTableDescriptor;
> import org.apache.hadoop.hbase.client.HBaseAdmin;
> import org.apache.hadoop.hbase.client.HTable;
> import junit.framework.TestCase;
> @SuppressWarnings("deprecation")
> public class TestTruncate extends TestCase {
> 	public void testTruncateInBranch_0_1() throws IOException{
> 		HTable table = new HTable("mytable");
> 		HBaseAdmin admin = new HBaseAdmin(new HBaseConfiguration());
> 		HTableDescriptor tableDesc = table.getMetadata();
> 		admin.deleteTable(table.getTableName());
> 		admin.createTable(tableDesc);
> 	}
> 	public void testTruncateInTrunk() throws IOException{
> 		HTable table = new HTable("mytable");
> 		HBaseAdmin admin = new HBaseAdmin(new HBaseConfiguration());
> 		Collection<HColumnDescriptor> families = table.getMetadata().getFamilies();
> 		
> 		HTableDescriptor tableDesc = new HTableDescriptor(table.getTableName());
> 		for(HColumnDescriptor family : families){
> 			tableDesc.addFamily(family);
> 		}
> 		admin.deleteTable(table.getTableName());
> 		admin.createTable(tableDesc);
> 	}
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HBASE-739) HBaseAdmin.createTable() using old HTableDescription doesn't work

Posted by "Izaak Rubin (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-739?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Izaak Rubin updated HBASE-739:
------------------------------

    Attachment: TestHbase739.java

I'm attaching the JUnit test I used for testing the issue.  The code is almost identical to that posted by Sebastien, except I've added lines that disable the table before dropping.

> HBaseAdmin.createTable() using old HTableDescription doesn't work
> -----------------------------------------------------------------
>
>                 Key: HBASE-739
>                 URL: https://issues.apache.org/jira/browse/HBASE-739
>             Project: Hadoop HBase
>          Issue Type: Bug
>          Components: client
>    Affects Versions: 0.2.0
>            Reporter: Sebastien Rainville
>            Assignee: Izaak Rubin
>            Priority: Minor
>         Attachments: hbase-739.patch, TestHbase739.java
>
>
> The following test case (see below) illustrate what used to work in branch 0.1 and that doesn't anymore. testTruncateInTrunk() shows how I got it to work again. I get this error now when trying the old code but using trunk:
> java.lang.reflect.InvocationTargetException
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:597)
> 	at com.openplaces.test.fixture.FixtureLoader.truncateHbaseTable(FixtureLoader.java:105)
> 	at com.openplaces.test.fixture.FixtureLoader.loadHbaseFixtures(FixtureLoader.java:63)
> 	at com.openplaces.test.fixture.TestCaseWithFixtures.hbaseFixtures(TestCaseWithFixtures.java:34)
> 	at com.openplaces.test.isolated.TestSearchSRFIEF.setUp(TestSearchSRFIEF.java:37)
> 	at junit.framework.TestCase.runBare(TestCase.java:125)
> 	at junit.framework.TestResult$1.protect(TestResult.java:106)
> 	at junit.framework.TestResult.runProtected(TestResult.java:124)
> 	at junit.framework.TestResult.run(TestResult.java:109)
> 	at junit.framework.TestCase.run(TestCase.java:118)
> 	at junit.framework.TestSuite.runTest(TestSuite.java:208)
> 	at junit.framework.TestSuite.run(TestSuite.java:203)
> 	at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
> 	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
> Caused by: java.net.SocketTimeoutException: timed out waiting for rpc response
> 	at org.apache.hadoop.ipc.Client.call(Client.java:559)
> 	at org.apache.hadoop.hbase.ipc.HbaseRPC$Invoker.invoke(HbaseRPC.java:211)
> 	at $Proxy5.createTable(Unknown Source)
> 	at org.apache.hadoop.hbase.client.HBaseAdmin.createTableAsync(HBaseAdmin.java:184)
> 	at org.apache.hadoop.hbase.client.HBaseAdmin.createTable(HBaseAdmin.java:144)
> 	at com.openplaces.util.hbaserecord.connectionadapters.HbaseAdapter.truncateTable(HbaseAdapter.java:502)
> 	at com.openplaces.util.hbaserecord.Base$Singleton.truncate(Base.java:609)
> 	... 21 more
> import java.io.IOException;
> import java.util.Collection;
> import org.apache.hadoop.hbase.HBaseConfiguration;
> import org.apache.hadoop.hbase.HColumnDescriptor;
> import org.apache.hadoop.hbase.HTableDescriptor;
> import org.apache.hadoop.hbase.client.HBaseAdmin;
> import org.apache.hadoop.hbase.client.HTable;
> import junit.framework.TestCase;
> @SuppressWarnings("deprecation")
> public class TestTruncate extends TestCase {
> 	public void testTruncateInBranch_0_1() throws IOException{
> 		HTable table = new HTable("mytable");
> 		HBaseAdmin admin = new HBaseAdmin(new HBaseConfiguration());
> 		HTableDescriptor tableDesc = table.getMetadata();
> 		admin.deleteTable(table.getTableName());
> 		admin.createTable(tableDesc);
> 	}
> 	public void testTruncateInTrunk() throws IOException{
> 		HTable table = new HTable("mytable");
> 		HBaseAdmin admin = new HBaseAdmin(new HBaseConfiguration());
> 		Collection<HColumnDescriptor> families = table.getMetadata().getFamilies();
> 		
> 		HTableDescriptor tableDesc = new HTableDescriptor(table.getTableName());
> 		for(HColumnDescriptor family : families){
> 			tableDesc.addFamily(family);
> 		}
> 		admin.deleteTable(table.getTableName());
> 		admin.createTable(tableDesc);
> 	}
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HBASE-739) HBaseAdmin.createTable() using old HTableDescription doesn't work

Posted by "Izaak Rubin (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-739?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Izaak Rubin updated HBASE-739:
------------------------------

    Attachment: hbase-739.patch

I've investigated this issue and have several things to report.  Sebastien, I wasn't able to replicate the exact error you gave in the issue description.  I did, however, get an error under the same circumstances (for testTruncateInBranch_0_1, although my error was a SocketTimeoutException).  Also, I should point out that the testing code you posted doesn't disable the table before dropping it, which causes other problems.

The issue, or at least the one that I experienced with SocketTimeoutException, was that UnmodifyableHTableDescriptor did not serialize.  The server could not see the UnmodifyableHTableDescriptor class because it was package-protected and resides in hbase.client.  The solution, and the attached patch, merely involves adding the word "public" to the UnmodifyableHTableDescriptor class declaration.  The server can now see the class and serialize it.  

> HBaseAdmin.createTable() using old HTableDescription doesn't work
> -----------------------------------------------------------------
>
>                 Key: HBASE-739
>                 URL: https://issues.apache.org/jira/browse/HBASE-739
>             Project: Hadoop HBase
>          Issue Type: Bug
>          Components: client
>    Affects Versions: 0.2.0
>            Reporter: Sebastien Rainville
>            Assignee: Izaak Rubin
>            Priority: Minor
>         Attachments: hbase-739.patch
>
>
> The following test case (see below) illustrate what used to work in branch 0.1 and that doesn't anymore. testTruncateInTrunk() shows how I got it to work again. I get this error now when trying the old code but using trunk:
> java.lang.reflect.InvocationTargetException
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:597)
> 	at com.openplaces.test.fixture.FixtureLoader.truncateHbaseTable(FixtureLoader.java:105)
> 	at com.openplaces.test.fixture.FixtureLoader.loadHbaseFixtures(FixtureLoader.java:63)
> 	at com.openplaces.test.fixture.TestCaseWithFixtures.hbaseFixtures(TestCaseWithFixtures.java:34)
> 	at com.openplaces.test.isolated.TestSearchSRFIEF.setUp(TestSearchSRFIEF.java:37)
> 	at junit.framework.TestCase.runBare(TestCase.java:125)
> 	at junit.framework.TestResult$1.protect(TestResult.java:106)
> 	at junit.framework.TestResult.runProtected(TestResult.java:124)
> 	at junit.framework.TestResult.run(TestResult.java:109)
> 	at junit.framework.TestCase.run(TestCase.java:118)
> 	at junit.framework.TestSuite.runTest(TestSuite.java:208)
> 	at junit.framework.TestSuite.run(TestSuite.java:203)
> 	at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
> 	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
> Caused by: java.net.SocketTimeoutException: timed out waiting for rpc response
> 	at org.apache.hadoop.ipc.Client.call(Client.java:559)
> 	at org.apache.hadoop.hbase.ipc.HbaseRPC$Invoker.invoke(HbaseRPC.java:211)
> 	at $Proxy5.createTable(Unknown Source)
> 	at org.apache.hadoop.hbase.client.HBaseAdmin.createTableAsync(HBaseAdmin.java:184)
> 	at org.apache.hadoop.hbase.client.HBaseAdmin.createTable(HBaseAdmin.java:144)
> 	at com.openplaces.util.hbaserecord.connectionadapters.HbaseAdapter.truncateTable(HbaseAdapter.java:502)
> 	at com.openplaces.util.hbaserecord.Base$Singleton.truncate(Base.java:609)
> 	... 21 more
> import java.io.IOException;
> import java.util.Collection;
> import org.apache.hadoop.hbase.HBaseConfiguration;
> import org.apache.hadoop.hbase.HColumnDescriptor;
> import org.apache.hadoop.hbase.HTableDescriptor;
> import org.apache.hadoop.hbase.client.HBaseAdmin;
> import org.apache.hadoop.hbase.client.HTable;
> import junit.framework.TestCase;
> @SuppressWarnings("deprecation")
> public class TestTruncate extends TestCase {
> 	public void testTruncateInBranch_0_1() throws IOException{
> 		HTable table = new HTable("mytable");
> 		HBaseAdmin admin = new HBaseAdmin(new HBaseConfiguration());
> 		HTableDescriptor tableDesc = table.getMetadata();
> 		admin.deleteTable(table.getTableName());
> 		admin.createTable(tableDesc);
> 	}
> 	public void testTruncateInTrunk() throws IOException{
> 		HTable table = new HTable("mytable");
> 		HBaseAdmin admin = new HBaseAdmin(new HBaseConfiguration());
> 		Collection<HColumnDescriptor> families = table.getMetadata().getFamilies();
> 		
> 		HTableDescriptor tableDesc = new HTableDescriptor(table.getTableName());
> 		for(HColumnDescriptor family : families){
> 			tableDesc.addFamily(family);
> 		}
> 		admin.deleteTable(table.getTableName());
> 		admin.createTable(tableDesc);
> 	}
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HBASE-739) HBaseAdmin.createTable() using old HTableDescription doesn't work

Posted by "Izaak Rubin (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-739?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Izaak Rubin updated HBASE-739:
------------------------------

    Attachment: hbase-739_v2.patch

I think I've really fixed it this time.  I added a default constructor to UnmodifyableHTableDescriptor, which I should have done in the last patch (this all goes in the same vein of making UnmodifyableHTableDescriptor serializable).  

I found that Eclipse really confused the testing process - I had definitely run the test with and without the default constructor, sometimes succeeding and sometimes failing.  Running the test on the command-line was much more useful and straightforward, and I'd recommend doing that instead (at least for this test).  Here's how you can run just that test on the command-line:

Add the following to your build.xml:

{code}
<target name="ensure-test-name" unless="test">
  <fail message="You must run this target with -Dtest=TestName"/>
</target>

<target name="runtest" description="Runs the test you specify on the command line with -Dtest=" depends="compile, ensure-test-name">
  <junit printsummary="withOutAndErr" fork="yes"> 
    <classpath refid="test.classpath" />
    <formatter type="plain" usefile="false"/>
    <batchtest>
      <fileset dir="${src.test}">
        <include name="**/${test}.java"/>
      </fileset>
    </batchtest>
  </junit>
</target>
{code}

Start HBase, make sure TestHbase739.java is added, "mytable" exists, etc, and then enter:

{code}
ant clean jar compile-test runtest -Dtest=TestHbase739
{code}

Without the attached patch, hbase-739_v2.patch, this should fail (it might say "Build Successful", but check the actual junit output).  After adding the attached patch, this should succeed (at least it did for me, when doing this process on a fresh copy of HBase).  

Let me know if this is still generating errors.

> HBaseAdmin.createTable() using old HTableDescription doesn't work
> -----------------------------------------------------------------
>
>                 Key: HBASE-739
>                 URL: https://issues.apache.org/jira/browse/HBASE-739
>             Project: Hadoop HBase
>          Issue Type: Bug
>          Components: client
>    Affects Versions: 0.2.0
>            Reporter: Sebastien Rainville
>            Assignee: Izaak Rubin
>            Priority: Minor
>         Attachments: hbase-739.patch, hbase-739_v2.patch, master.log, TEST-org.apache.hadoop.hbase.TestTruncateIsaak.txt, TestHbase739.java, TestTruncate2.java
>
>
> The following test case (see below) illustrate what used to work in branch 0.1 and that doesn't anymore. testTruncateInTrunk() shows how I got it to work again. I get this error now when trying the old code but using trunk:
> java.lang.reflect.InvocationTargetException
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:597)
> 	at com.openplaces.test.fixture.FixtureLoader.truncateHbaseTable(FixtureLoader.java:105)
> 	at com.openplaces.test.fixture.FixtureLoader.loadHbaseFixtures(FixtureLoader.java:63)
> 	at com.openplaces.test.fixture.TestCaseWithFixtures.hbaseFixtures(TestCaseWithFixtures.java:34)
> 	at com.openplaces.test.isolated.TestSearchSRFIEF.setUp(TestSearchSRFIEF.java:37)
> 	at junit.framework.TestCase.runBare(TestCase.java:125)
> 	at junit.framework.TestResult$1.protect(TestResult.java:106)
> 	at junit.framework.TestResult.runProtected(TestResult.java:124)
> 	at junit.framework.TestResult.run(TestResult.java:109)
> 	at junit.framework.TestCase.run(TestCase.java:118)
> 	at junit.framework.TestSuite.runTest(TestSuite.java:208)
> 	at junit.framework.TestSuite.run(TestSuite.java:203)
> 	at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
> 	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
> Caused by: java.net.SocketTimeoutException: timed out waiting for rpc response
> 	at org.apache.hadoop.ipc.Client.call(Client.java:559)
> 	at org.apache.hadoop.hbase.ipc.HbaseRPC$Invoker.invoke(HbaseRPC.java:211)
> 	at $Proxy5.createTable(Unknown Source)
> 	at org.apache.hadoop.hbase.client.HBaseAdmin.createTableAsync(HBaseAdmin.java:184)
> 	at org.apache.hadoop.hbase.client.HBaseAdmin.createTable(HBaseAdmin.java:144)
> 	at com.openplaces.util.hbaserecord.connectionadapters.HbaseAdapter.truncateTable(HbaseAdapter.java:502)
> 	at com.openplaces.util.hbaserecord.Base$Singleton.truncate(Base.java:609)
> 	... 21 more
> import java.io.IOException;
> import java.util.Collection;
> import org.apache.hadoop.hbase.HBaseConfiguration;
> import org.apache.hadoop.hbase.HColumnDescriptor;
> import org.apache.hadoop.hbase.HTableDescriptor;
> import org.apache.hadoop.hbase.client.HBaseAdmin;
> import org.apache.hadoop.hbase.client.HTable;
> import junit.framework.TestCase;
> @SuppressWarnings("deprecation")
> public class TestTruncate extends TestCase {
> 	public void testTruncateInBranch_0_1() throws IOException{
> 		HTable table = new HTable("mytable");
> 		HBaseAdmin admin = new HBaseAdmin(new HBaseConfiguration());
> 		HTableDescriptor tableDesc = table.getMetadata();
> 		admin.deleteTable(table.getTableName());
> 		admin.createTable(tableDesc);
> 	}
> 	public void testTruncateInTrunk() throws IOException{
> 		HTable table = new HTable("mytable");
> 		HBaseAdmin admin = new HBaseAdmin(new HBaseConfiguration());
> 		Collection<HColumnDescriptor> families = table.getMetadata().getFamilies();
> 		
> 		HTableDescriptor tableDesc = new HTableDescriptor(table.getTableName());
> 		for(HColumnDescriptor family : families){
> 			tableDesc.addFamily(family);
> 		}
> 		admin.deleteTable(table.getTableName());
> 		admin.createTable(tableDesc);
> 	}
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HBASE-739) HBaseAdmin.createTable() using old HTableDescription doesn't work

Posted by "stack (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-739?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12613009#action_12613009 ] 

stack commented on HBASE-739:
-----------------------------

I applied Izaak's patch (You should be able to use an UnmodifableHTD in the manner Sebastien is trying to use it above).

Sebastien, if Izaak's patch fixes your issue, please close this issue; otherwise, provide more info.  Thanks.

> HBaseAdmin.createTable() using old HTableDescription doesn't work
> -----------------------------------------------------------------
>
>                 Key: HBASE-739
>                 URL: https://issues.apache.org/jira/browse/HBASE-739
>             Project: Hadoop HBase
>          Issue Type: Bug
>          Components: client
>    Affects Versions: 0.2.0
>            Reporter: Sebastien Rainville
>            Assignee: Izaak Rubin
>            Priority: Minor
>         Attachments: hbase-739.patch
>
>
> The following test case (see below) illustrate what used to work in branch 0.1 and that doesn't anymore. testTruncateInTrunk() shows how I got it to work again. I get this error now when trying the old code but using trunk:
> java.lang.reflect.InvocationTargetException
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:597)
> 	at com.openplaces.test.fixture.FixtureLoader.truncateHbaseTable(FixtureLoader.java:105)
> 	at com.openplaces.test.fixture.FixtureLoader.loadHbaseFixtures(FixtureLoader.java:63)
> 	at com.openplaces.test.fixture.TestCaseWithFixtures.hbaseFixtures(TestCaseWithFixtures.java:34)
> 	at com.openplaces.test.isolated.TestSearchSRFIEF.setUp(TestSearchSRFIEF.java:37)
> 	at junit.framework.TestCase.runBare(TestCase.java:125)
> 	at junit.framework.TestResult$1.protect(TestResult.java:106)
> 	at junit.framework.TestResult.runProtected(TestResult.java:124)
> 	at junit.framework.TestResult.run(TestResult.java:109)
> 	at junit.framework.TestCase.run(TestCase.java:118)
> 	at junit.framework.TestSuite.runTest(TestSuite.java:208)
> 	at junit.framework.TestSuite.run(TestSuite.java:203)
> 	at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
> 	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
> Caused by: java.net.SocketTimeoutException: timed out waiting for rpc response
> 	at org.apache.hadoop.ipc.Client.call(Client.java:559)
> 	at org.apache.hadoop.hbase.ipc.HbaseRPC$Invoker.invoke(HbaseRPC.java:211)
> 	at $Proxy5.createTable(Unknown Source)
> 	at org.apache.hadoop.hbase.client.HBaseAdmin.createTableAsync(HBaseAdmin.java:184)
> 	at org.apache.hadoop.hbase.client.HBaseAdmin.createTable(HBaseAdmin.java:144)
> 	at com.openplaces.util.hbaserecord.connectionadapters.HbaseAdapter.truncateTable(HbaseAdapter.java:502)
> 	at com.openplaces.util.hbaserecord.Base$Singleton.truncate(Base.java:609)
> 	... 21 more
> import java.io.IOException;
> import java.util.Collection;
> import org.apache.hadoop.hbase.HBaseConfiguration;
> import org.apache.hadoop.hbase.HColumnDescriptor;
> import org.apache.hadoop.hbase.HTableDescriptor;
> import org.apache.hadoop.hbase.client.HBaseAdmin;
> import org.apache.hadoop.hbase.client.HTable;
> import junit.framework.TestCase;
> @SuppressWarnings("deprecation")
> public class TestTruncate extends TestCase {
> 	public void testTruncateInBranch_0_1() throws IOException{
> 		HTable table = new HTable("mytable");
> 		HBaseAdmin admin = new HBaseAdmin(new HBaseConfiguration());
> 		HTableDescriptor tableDesc = table.getMetadata();
> 		admin.deleteTable(table.getTableName());
> 		admin.createTable(tableDesc);
> 	}
> 	public void testTruncateInTrunk() throws IOException{
> 		HTable table = new HTable("mytable");
> 		HBaseAdmin admin = new HBaseAdmin(new HBaseConfiguration());
> 		Collection<HColumnDescriptor> families = table.getMetadata().getFamilies();
> 		
> 		HTableDescriptor tableDesc = new HTableDescriptor(table.getTableName());
> 		for(HColumnDescriptor family : families){
> 			tableDesc.addFamily(family);
> 		}
> 		admin.deleteTable(table.getTableName());
> 		admin.createTable(tableDesc);
> 	}
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (HBASE-739) HBaseAdmin.createTable() using old HTableDescription doesn't work

Posted by "Sebastien Rainville (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-739?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sebastien Rainville resolved HBASE-739.
---------------------------------------

       Resolution: Fixed
    Fix Version/s: 0.2.0

Unit test ran successfuly on my box too using the code in trunk, which has your patch applied.

> HBaseAdmin.createTable() using old HTableDescription doesn't work
> -----------------------------------------------------------------
>
>                 Key: HBASE-739
>                 URL: https://issues.apache.org/jira/browse/HBASE-739
>             Project: Hadoop HBase
>          Issue Type: Bug
>          Components: client
>    Affects Versions: 0.2.0
>            Reporter: Sebastien Rainville
>            Assignee: Izaak Rubin
>            Priority: Minor
>             Fix For: 0.2.0
>
>         Attachments: hbase-739.patch, hbase-739_v2.patch, master.log, TEST-org.apache.hadoop.hbase.TestTruncateIsaak.txt, TestHbase739.java, TestTruncate2.java
>
>
> The following test case (see below) illustrate what used to work in branch 0.1 and that doesn't anymore. testTruncateInTrunk() shows how I got it to work again. I get this error now when trying the old code but using trunk:
> java.lang.reflect.InvocationTargetException
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:597)
> 	at com.openplaces.test.fixture.FixtureLoader.truncateHbaseTable(FixtureLoader.java:105)
> 	at com.openplaces.test.fixture.FixtureLoader.loadHbaseFixtures(FixtureLoader.java:63)
> 	at com.openplaces.test.fixture.TestCaseWithFixtures.hbaseFixtures(TestCaseWithFixtures.java:34)
> 	at com.openplaces.test.isolated.TestSearchSRFIEF.setUp(TestSearchSRFIEF.java:37)
> 	at junit.framework.TestCase.runBare(TestCase.java:125)
> 	at junit.framework.TestResult$1.protect(TestResult.java:106)
> 	at junit.framework.TestResult.runProtected(TestResult.java:124)
> 	at junit.framework.TestResult.run(TestResult.java:109)
> 	at junit.framework.TestCase.run(TestCase.java:118)
> 	at junit.framework.TestSuite.runTest(TestSuite.java:208)
> 	at junit.framework.TestSuite.run(TestSuite.java:203)
> 	at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
> 	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
> Caused by: java.net.SocketTimeoutException: timed out waiting for rpc response
> 	at org.apache.hadoop.ipc.Client.call(Client.java:559)
> 	at org.apache.hadoop.hbase.ipc.HbaseRPC$Invoker.invoke(HbaseRPC.java:211)
> 	at $Proxy5.createTable(Unknown Source)
> 	at org.apache.hadoop.hbase.client.HBaseAdmin.createTableAsync(HBaseAdmin.java:184)
> 	at org.apache.hadoop.hbase.client.HBaseAdmin.createTable(HBaseAdmin.java:144)
> 	at com.openplaces.util.hbaserecord.connectionadapters.HbaseAdapter.truncateTable(HbaseAdapter.java:502)
> 	at com.openplaces.util.hbaserecord.Base$Singleton.truncate(Base.java:609)
> 	... 21 more
> import java.io.IOException;
> import java.util.Collection;
> import org.apache.hadoop.hbase.HBaseConfiguration;
> import org.apache.hadoop.hbase.HColumnDescriptor;
> import org.apache.hadoop.hbase.HTableDescriptor;
> import org.apache.hadoop.hbase.client.HBaseAdmin;
> import org.apache.hadoop.hbase.client.HTable;
> import junit.framework.TestCase;
> @SuppressWarnings("deprecation")
> public class TestTruncate extends TestCase {
> 	public void testTruncateInBranch_0_1() throws IOException{
> 		HTable table = new HTable("mytable");
> 		HBaseAdmin admin = new HBaseAdmin(new HBaseConfiguration());
> 		HTableDescriptor tableDesc = table.getMetadata();
> 		admin.deleteTable(table.getTableName());
> 		admin.createTable(tableDesc);
> 	}
> 	public void testTruncateInTrunk() throws IOException{
> 		HTable table = new HTable("mytable");
> 		HBaseAdmin admin = new HBaseAdmin(new HBaseConfiguration());
> 		Collection<HColumnDescriptor> families = table.getMetadata().getFamilies();
> 		
> 		HTableDescriptor tableDesc = new HTableDescriptor(table.getTableName());
> 		for(HColumnDescriptor family : families){
> 			tableDesc.addFamily(family);
> 		}
> 		admin.deleteTable(table.getTableName());
> 		admin.createTable(tableDesc);
> 	}
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HBASE-739) HBaseAdmin.createTable() using old HTableDescription doesn't work

Posted by "Jim Kellerman (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-739?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12612910#action_12612910 ] 

Jim Kellerman commented on HBASE-739:
-------------------------------------

The API for 0.2.0 is not backward compatible with 0.1.x 

This was a deliberate decision since the new features of 0.2.0 required big API changes, and some of the 0.1.x behavior cannot be supported with a compatibility layer.

> HBaseAdmin.createTable() using old HTableDescription doesn't work
> -----------------------------------------------------------------
>
>                 Key: HBASE-739
>                 URL: https://issues.apache.org/jira/browse/HBASE-739
>             Project: Hadoop HBase
>          Issue Type: Bug
>          Components: client
>    Affects Versions: 0.2.0
>            Reporter: Sebastien Rainville
>            Assignee: Izaak Rubin
>            Priority: Minor
>
> The following test case (see below) illustrate what used to work in branch 0.1 and that doesn't anymore. testTruncateInTrunk() shows how I got it to work again. I get this error now when trying the old code but using trunk:
> java.lang.reflect.InvocationTargetException
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:597)
> 	at com.openplaces.test.fixture.FixtureLoader.truncateHbaseTable(FixtureLoader.java:105)
> 	at com.openplaces.test.fixture.FixtureLoader.loadHbaseFixtures(FixtureLoader.java:63)
> 	at com.openplaces.test.fixture.TestCaseWithFixtures.hbaseFixtures(TestCaseWithFixtures.java:34)
> 	at com.openplaces.test.isolated.TestSearchSRFIEF.setUp(TestSearchSRFIEF.java:37)
> 	at junit.framework.TestCase.runBare(TestCase.java:125)
> 	at junit.framework.TestResult$1.protect(TestResult.java:106)
> 	at junit.framework.TestResult.runProtected(TestResult.java:124)
> 	at junit.framework.TestResult.run(TestResult.java:109)
> 	at junit.framework.TestCase.run(TestCase.java:118)
> 	at junit.framework.TestSuite.runTest(TestSuite.java:208)
> 	at junit.framework.TestSuite.run(TestSuite.java:203)
> 	at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
> 	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
> Caused by: java.net.SocketTimeoutException: timed out waiting for rpc response
> 	at org.apache.hadoop.ipc.Client.call(Client.java:559)
> 	at org.apache.hadoop.hbase.ipc.HbaseRPC$Invoker.invoke(HbaseRPC.java:211)
> 	at $Proxy5.createTable(Unknown Source)
> 	at org.apache.hadoop.hbase.client.HBaseAdmin.createTableAsync(HBaseAdmin.java:184)
> 	at org.apache.hadoop.hbase.client.HBaseAdmin.createTable(HBaseAdmin.java:144)
> 	at com.openplaces.util.hbaserecord.connectionadapters.HbaseAdapter.truncateTable(HbaseAdapter.java:502)
> 	at com.openplaces.util.hbaserecord.Base$Singleton.truncate(Base.java:609)
> 	... 21 more
> import java.io.IOException;
> import java.util.Collection;
> import org.apache.hadoop.hbase.HBaseConfiguration;
> import org.apache.hadoop.hbase.HColumnDescriptor;
> import org.apache.hadoop.hbase.HTableDescriptor;
> import org.apache.hadoop.hbase.client.HBaseAdmin;
> import org.apache.hadoop.hbase.client.HTable;
> import junit.framework.TestCase;
> @SuppressWarnings("deprecation")
> public class TestTruncate extends TestCase {
> 	public void testTruncateInBranch_0_1() throws IOException{
> 		HTable table = new HTable("mytable");
> 		HBaseAdmin admin = new HBaseAdmin(new HBaseConfiguration());
> 		HTableDescriptor tableDesc = table.getMetadata();
> 		admin.deleteTable(table.getTableName());
> 		admin.createTable(tableDesc);
> 	}
> 	public void testTruncateInTrunk() throws IOException{
> 		HTable table = new HTable("mytable");
> 		HBaseAdmin admin = new HBaseAdmin(new HBaseConfiguration());
> 		Collection<HColumnDescriptor> families = table.getMetadata().getFamilies();
> 		
> 		HTableDescriptor tableDesc = new HTableDescriptor(table.getTableName());
> 		for(HColumnDescriptor family : families){
> 			tableDesc.addFamily(family);
> 		}
> 		admin.deleteTable(table.getTableName());
> 		admin.createTable(tableDesc);
> 	}
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HBASE-739) HBaseAdmin.createTable() using old HTableDescription doesn't work

Posted by "Sebastien Rainville (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-739?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12613325#action_12613325 ] 

Sebastien Rainville commented on HBASE-739:
-------------------------------------------

Actually, I'm not getting the exact same error as before. I'm getting java.net.SocketTimeoutException directly... and before I was getting a java.lang.reflect.InvocationTargetException CAUSED BY java.net.SocketTimeoutException.

It sounds like I'm getting the same error as you were seeing Isaac but somehow you got rid of it and not me. (and yes I updated my code and I see that you patch has been applied) So, your patch resolved the java.lang.reflect.InvocationTargetException but not the java.net.SocketTimeoutException.


> HBaseAdmin.createTable() using old HTableDescription doesn't work
> -----------------------------------------------------------------
>
>                 Key: HBASE-739
>                 URL: https://issues.apache.org/jira/browse/HBASE-739
>             Project: Hadoop HBase
>          Issue Type: Bug
>          Components: client
>    Affects Versions: 0.2.0
>            Reporter: Sebastien Rainville
>            Assignee: Izaak Rubin
>            Priority: Minor
>         Attachments: hbase-739.patch, master.log, TEST-org.apache.hadoop.hbase.TestTruncateIsaak.txt, TestHbase739.java, TestTruncate2.java
>
>
> The following test case (see below) illustrate what used to work in branch 0.1 and that doesn't anymore. testTruncateInTrunk() shows how I got it to work again. I get this error now when trying the old code but using trunk:
> java.lang.reflect.InvocationTargetException
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:597)
> 	at com.openplaces.test.fixture.FixtureLoader.truncateHbaseTable(FixtureLoader.java:105)
> 	at com.openplaces.test.fixture.FixtureLoader.loadHbaseFixtures(FixtureLoader.java:63)
> 	at com.openplaces.test.fixture.TestCaseWithFixtures.hbaseFixtures(TestCaseWithFixtures.java:34)
> 	at com.openplaces.test.isolated.TestSearchSRFIEF.setUp(TestSearchSRFIEF.java:37)
> 	at junit.framework.TestCase.runBare(TestCase.java:125)
> 	at junit.framework.TestResult$1.protect(TestResult.java:106)
> 	at junit.framework.TestResult.runProtected(TestResult.java:124)
> 	at junit.framework.TestResult.run(TestResult.java:109)
> 	at junit.framework.TestCase.run(TestCase.java:118)
> 	at junit.framework.TestSuite.runTest(TestSuite.java:208)
> 	at junit.framework.TestSuite.run(TestSuite.java:203)
> 	at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
> 	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
> Caused by: java.net.SocketTimeoutException: timed out waiting for rpc response
> 	at org.apache.hadoop.ipc.Client.call(Client.java:559)
> 	at org.apache.hadoop.hbase.ipc.HbaseRPC$Invoker.invoke(HbaseRPC.java:211)
> 	at $Proxy5.createTable(Unknown Source)
> 	at org.apache.hadoop.hbase.client.HBaseAdmin.createTableAsync(HBaseAdmin.java:184)
> 	at org.apache.hadoop.hbase.client.HBaseAdmin.createTable(HBaseAdmin.java:144)
> 	at com.openplaces.util.hbaserecord.connectionadapters.HbaseAdapter.truncateTable(HbaseAdapter.java:502)
> 	at com.openplaces.util.hbaserecord.Base$Singleton.truncate(Base.java:609)
> 	... 21 more
> import java.io.IOException;
> import java.util.Collection;
> import org.apache.hadoop.hbase.HBaseConfiguration;
> import org.apache.hadoop.hbase.HColumnDescriptor;
> import org.apache.hadoop.hbase.HTableDescriptor;
> import org.apache.hadoop.hbase.client.HBaseAdmin;
> import org.apache.hadoop.hbase.client.HTable;
> import junit.framework.TestCase;
> @SuppressWarnings("deprecation")
> public class TestTruncate extends TestCase {
> 	public void testTruncateInBranch_0_1() throws IOException{
> 		HTable table = new HTable("mytable");
> 		HBaseAdmin admin = new HBaseAdmin(new HBaseConfiguration());
> 		HTableDescriptor tableDesc = table.getMetadata();
> 		admin.deleteTable(table.getTableName());
> 		admin.createTable(tableDesc);
> 	}
> 	public void testTruncateInTrunk() throws IOException{
> 		HTable table = new HTable("mytable");
> 		HBaseAdmin admin = new HBaseAdmin(new HBaseConfiguration());
> 		Collection<HColumnDescriptor> families = table.getMetadata().getFamilies();
> 		
> 		HTableDescriptor tableDesc = new HTableDescriptor(table.getTableName());
> 		for(HColumnDescriptor family : families){
> 			tableDesc.addFamily(family);
> 		}
> 		admin.deleteTable(table.getTableName());
> 		admin.createTable(tableDesc);
> 	}
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HBASE-739) HBaseAdmin.createTable() using old HTableDescription doesn't work

Posted by "Izaak Rubin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-739?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12613362#action_12613362 ] 

Izaak Rubin commented on HBASE-739:
-----------------------------------

Yeah, I'm also getting the same error again.  Its weird, the code hasn't changed since Friday!  I'm looking back into it again.

> HBaseAdmin.createTable() using old HTableDescription doesn't work
> -----------------------------------------------------------------
>
>                 Key: HBASE-739
>                 URL: https://issues.apache.org/jira/browse/HBASE-739
>             Project: Hadoop HBase
>          Issue Type: Bug
>          Components: client
>    Affects Versions: 0.2.0
>            Reporter: Sebastien Rainville
>            Assignee: Izaak Rubin
>            Priority: Minor
>         Attachments: hbase-739.patch, master.log, TEST-org.apache.hadoop.hbase.TestTruncateIsaak.txt, TestHbase739.java, TestTruncate2.java
>
>
> The following test case (see below) illustrate what used to work in branch 0.1 and that doesn't anymore. testTruncateInTrunk() shows how I got it to work again. I get this error now when trying the old code but using trunk:
> java.lang.reflect.InvocationTargetException
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:597)
> 	at com.openplaces.test.fixture.FixtureLoader.truncateHbaseTable(FixtureLoader.java:105)
> 	at com.openplaces.test.fixture.FixtureLoader.loadHbaseFixtures(FixtureLoader.java:63)
> 	at com.openplaces.test.fixture.TestCaseWithFixtures.hbaseFixtures(TestCaseWithFixtures.java:34)
> 	at com.openplaces.test.isolated.TestSearchSRFIEF.setUp(TestSearchSRFIEF.java:37)
> 	at junit.framework.TestCase.runBare(TestCase.java:125)
> 	at junit.framework.TestResult$1.protect(TestResult.java:106)
> 	at junit.framework.TestResult.runProtected(TestResult.java:124)
> 	at junit.framework.TestResult.run(TestResult.java:109)
> 	at junit.framework.TestCase.run(TestCase.java:118)
> 	at junit.framework.TestSuite.runTest(TestSuite.java:208)
> 	at junit.framework.TestSuite.run(TestSuite.java:203)
> 	at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
> 	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
> Caused by: java.net.SocketTimeoutException: timed out waiting for rpc response
> 	at org.apache.hadoop.ipc.Client.call(Client.java:559)
> 	at org.apache.hadoop.hbase.ipc.HbaseRPC$Invoker.invoke(HbaseRPC.java:211)
> 	at $Proxy5.createTable(Unknown Source)
> 	at org.apache.hadoop.hbase.client.HBaseAdmin.createTableAsync(HBaseAdmin.java:184)
> 	at org.apache.hadoop.hbase.client.HBaseAdmin.createTable(HBaseAdmin.java:144)
> 	at com.openplaces.util.hbaserecord.connectionadapters.HbaseAdapter.truncateTable(HbaseAdapter.java:502)
> 	at com.openplaces.util.hbaserecord.Base$Singleton.truncate(Base.java:609)
> 	... 21 more
> import java.io.IOException;
> import java.util.Collection;
> import org.apache.hadoop.hbase.HBaseConfiguration;
> import org.apache.hadoop.hbase.HColumnDescriptor;
> import org.apache.hadoop.hbase.HTableDescriptor;
> import org.apache.hadoop.hbase.client.HBaseAdmin;
> import org.apache.hadoop.hbase.client.HTable;
> import junit.framework.TestCase;
> @SuppressWarnings("deprecation")
> public class TestTruncate extends TestCase {
> 	public void testTruncateInBranch_0_1() throws IOException{
> 		HTable table = new HTable("mytable");
> 		HBaseAdmin admin = new HBaseAdmin(new HBaseConfiguration());
> 		HTableDescriptor tableDesc = table.getMetadata();
> 		admin.deleteTable(table.getTableName());
> 		admin.createTable(tableDesc);
> 	}
> 	public void testTruncateInTrunk() throws IOException{
> 		HTable table = new HTable("mytable");
> 		HBaseAdmin admin = new HBaseAdmin(new HBaseConfiguration());
> 		Collection<HColumnDescriptor> families = table.getMetadata().getFamilies();
> 		
> 		HTableDescriptor tableDesc = new HTableDescriptor(table.getTableName());
> 		for(HColumnDescriptor family : families){
> 			tableDesc.addFamily(family);
> 		}
> 		admin.deleteTable(table.getTableName());
> 		admin.createTable(tableDesc);
> 	}
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (HBASE-739) HBaseAdmin.createTable() using old HTableDescription doesn't work

Posted by "stack (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-739?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

stack reassigned HBASE-739:
---------------------------

    Assignee: Izaak Rubin

> HBaseAdmin.createTable() using old HTableDescription doesn't work
> -----------------------------------------------------------------
>
>                 Key: HBASE-739
>                 URL: https://issues.apache.org/jira/browse/HBASE-739
>             Project: Hadoop HBase
>          Issue Type: Bug
>          Components: client
>    Affects Versions: 0.2.0
>            Reporter: Sebastien Rainville
>            Assignee: Izaak Rubin
>            Priority: Minor
>
> The following test case (see below) illustrate what used to work in branch 0.1 and that doesn't anymore. testTruncateInTrunk() shows how I got it to work again. I get this error now when trying the old code but using trunk:
> java.lang.reflect.InvocationTargetException
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:597)
> 	at com.openplaces.test.fixture.FixtureLoader.truncateHbaseTable(FixtureLoader.java:105)
> 	at com.openplaces.test.fixture.FixtureLoader.loadHbaseFixtures(FixtureLoader.java:63)
> 	at com.openplaces.test.fixture.TestCaseWithFixtures.hbaseFixtures(TestCaseWithFixtures.java:34)
> 	at com.openplaces.test.isolated.TestSearchSRFIEF.setUp(TestSearchSRFIEF.java:37)
> 	at junit.framework.TestCase.runBare(TestCase.java:125)
> 	at junit.framework.TestResult$1.protect(TestResult.java:106)
> 	at junit.framework.TestResult.runProtected(TestResult.java:124)
> 	at junit.framework.TestResult.run(TestResult.java:109)
> 	at junit.framework.TestCase.run(TestCase.java:118)
> 	at junit.framework.TestSuite.runTest(TestSuite.java:208)
> 	at junit.framework.TestSuite.run(TestSuite.java:203)
> 	at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
> 	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
> Caused by: java.net.SocketTimeoutException: timed out waiting for rpc response
> 	at org.apache.hadoop.ipc.Client.call(Client.java:559)
> 	at org.apache.hadoop.hbase.ipc.HbaseRPC$Invoker.invoke(HbaseRPC.java:211)
> 	at $Proxy5.createTable(Unknown Source)
> 	at org.apache.hadoop.hbase.client.HBaseAdmin.createTableAsync(HBaseAdmin.java:184)
> 	at org.apache.hadoop.hbase.client.HBaseAdmin.createTable(HBaseAdmin.java:144)
> 	at com.openplaces.util.hbaserecord.connectionadapters.HbaseAdapter.truncateTable(HbaseAdapter.java:502)
> 	at com.openplaces.util.hbaserecord.Base$Singleton.truncate(Base.java:609)
> 	... 21 more
> import java.io.IOException;
> import java.util.Collection;
> import org.apache.hadoop.hbase.HBaseConfiguration;
> import org.apache.hadoop.hbase.HColumnDescriptor;
> import org.apache.hadoop.hbase.HTableDescriptor;
> import org.apache.hadoop.hbase.client.HBaseAdmin;
> import org.apache.hadoop.hbase.client.HTable;
> import junit.framework.TestCase;
> @SuppressWarnings("deprecation")
> public class TestTruncate extends TestCase {
> 	public void testTruncateInBranch_0_1() throws IOException{
> 		HTable table = new HTable("mytable");
> 		HBaseAdmin admin = new HBaseAdmin(new HBaseConfiguration());
> 		HTableDescriptor tableDesc = table.getMetadata();
> 		admin.deleteTable(table.getTableName());
> 		admin.createTable(tableDesc);
> 	}
> 	public void testTruncateInTrunk() throws IOException{
> 		HTable table = new HTable("mytable");
> 		HBaseAdmin admin = new HBaseAdmin(new HBaseConfiguration());
> 		Collection<HColumnDescriptor> families = table.getMetadata().getFamilies();
> 		
> 		HTableDescriptor tableDesc = new HTableDescriptor(table.getTableName());
> 		for(HColumnDescriptor family : families){
> 			tableDesc.addFamily(family);
> 		}
> 		admin.deleteTable(table.getTableName());
> 		admin.createTable(tableDesc);
> 	}
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HBASE-739) HBaseAdmin.createTable() using old HTableDescription doesn't work

Posted by "Sebastien Rainville (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-739?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sebastien Rainville updated HBASE-739:
--------------------------------------

    Attachment: master.log
                TestTruncate2.java
                TEST-org.apache.hadoop.hbase.TestTruncateIsaak.txt

I'm still getting the same error. I attached the logs of the test case and the master in debug mode. I modified the test case so it creates the test table automatically. I'm not so worried about this issue but it might uncover something worse underneath. And about the missing disableTable()... it was a copy paste error.

> HBaseAdmin.createTable() using old HTableDescription doesn't work
> -----------------------------------------------------------------
>
>                 Key: HBASE-739
>                 URL: https://issues.apache.org/jira/browse/HBASE-739
>             Project: Hadoop HBase
>          Issue Type: Bug
>          Components: client
>    Affects Versions: 0.2.0
>            Reporter: Sebastien Rainville
>            Assignee: Izaak Rubin
>            Priority: Minor
>         Attachments: hbase-739.patch, master.log, TEST-org.apache.hadoop.hbase.TestTruncateIsaak.txt, TestHbase739.java, TestTruncate2.java
>
>
> The following test case (see below) illustrate what used to work in branch 0.1 and that doesn't anymore. testTruncateInTrunk() shows how I got it to work again. I get this error now when trying the old code but using trunk:
> java.lang.reflect.InvocationTargetException
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:597)
> 	at com.openplaces.test.fixture.FixtureLoader.truncateHbaseTable(FixtureLoader.java:105)
> 	at com.openplaces.test.fixture.FixtureLoader.loadHbaseFixtures(FixtureLoader.java:63)
> 	at com.openplaces.test.fixture.TestCaseWithFixtures.hbaseFixtures(TestCaseWithFixtures.java:34)
> 	at com.openplaces.test.isolated.TestSearchSRFIEF.setUp(TestSearchSRFIEF.java:37)
> 	at junit.framework.TestCase.runBare(TestCase.java:125)
> 	at junit.framework.TestResult$1.protect(TestResult.java:106)
> 	at junit.framework.TestResult.runProtected(TestResult.java:124)
> 	at junit.framework.TestResult.run(TestResult.java:109)
> 	at junit.framework.TestCase.run(TestCase.java:118)
> 	at junit.framework.TestSuite.runTest(TestSuite.java:208)
> 	at junit.framework.TestSuite.run(TestSuite.java:203)
> 	at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
> 	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
> Caused by: java.net.SocketTimeoutException: timed out waiting for rpc response
> 	at org.apache.hadoop.ipc.Client.call(Client.java:559)
> 	at org.apache.hadoop.hbase.ipc.HbaseRPC$Invoker.invoke(HbaseRPC.java:211)
> 	at $Proxy5.createTable(Unknown Source)
> 	at org.apache.hadoop.hbase.client.HBaseAdmin.createTableAsync(HBaseAdmin.java:184)
> 	at org.apache.hadoop.hbase.client.HBaseAdmin.createTable(HBaseAdmin.java:144)
> 	at com.openplaces.util.hbaserecord.connectionadapters.HbaseAdapter.truncateTable(HbaseAdapter.java:502)
> 	at com.openplaces.util.hbaserecord.Base$Singleton.truncate(Base.java:609)
> 	... 21 more
> import java.io.IOException;
> import java.util.Collection;
> import org.apache.hadoop.hbase.HBaseConfiguration;
> import org.apache.hadoop.hbase.HColumnDescriptor;
> import org.apache.hadoop.hbase.HTableDescriptor;
> import org.apache.hadoop.hbase.client.HBaseAdmin;
> import org.apache.hadoop.hbase.client.HTable;
> import junit.framework.TestCase;
> @SuppressWarnings("deprecation")
> public class TestTruncate extends TestCase {
> 	public void testTruncateInBranch_0_1() throws IOException{
> 		HTable table = new HTable("mytable");
> 		HBaseAdmin admin = new HBaseAdmin(new HBaseConfiguration());
> 		HTableDescriptor tableDesc = table.getMetadata();
> 		admin.deleteTable(table.getTableName());
> 		admin.createTable(tableDesc);
> 	}
> 	public void testTruncateInTrunk() throws IOException{
> 		HTable table = new HTable("mytable");
> 		HBaseAdmin admin = new HBaseAdmin(new HBaseConfiguration());
> 		Collection<HColumnDescriptor> families = table.getMetadata().getFamilies();
> 		
> 		HTableDescriptor tableDesc = new HTableDescriptor(table.getTableName());
> 		for(HColumnDescriptor family : families){
> 			tableDesc.addFamily(family);
> 		}
> 		admin.deleteTable(table.getTableName());
> 		admin.createTable(tableDesc);
> 	}
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.