C:\hadoop is my installation

C:\workspace\hadoop-commit is my checked out SVN tree which is current
with trunk.

/cygdrive/c$ diff hadoop/conf/hadoop-site.xml workspace/hadoop-commit/conf
7,17c7
< <property>
<   <name>hadoop.tmp.dir</name>
<   <value>C:\hadoop\tmp</value>
<   <description>A base for other temporary directories.</description>
< </property>
< <!-- uncomment if running distributed
< <property>
<   <name>fs.default.name</name>
<   <value>localhost:50000</value>
< </property>
< -->
---
>

/cygdrive/c/hadoop/src/contrib/hbase$ diff conf/hbase-site.xml ../../../../work
space/hadoop-commit/src/contrib/hbase/conf/
/cygdrive/c/hadoop/src/contrib/hbase$

(i.e. no changes)

sshd must be configured and running
/cygdrive/c/hadoop/src/contrib/hbase$ /usr/sbin/sshd

start HBase...
/cygdrive/c/hadoop/src/contrib/hbase$ bin/start-hbase.sh
FileSystem is file:///
starting master, logging to /cygdrive/c/hadoop/src/contrib/hbase/bin/../../../..
//logs/hbase-jim-master-JIM.out
[EMAIL PROTECTED]'s password:
localhost: starting regionserver, logging to /cygdrive/c/hadoop/src/contrib/hbas
e/bin/../../../..//logs/hbase-jim-regionserver-JIM.out

(create table with HBase shell)
/cygdrive/c/hadoop/src/contrib/hbase$ bin/hbase shell
Hbase Shell, 0.0.2 version.
Copyright (c) 2007 by udanax, licensed to Apache Software Foundation.
Type 'help;' for usage.

Hbase> create table test (contents);
Creating table... Please wait.
Table created successfully.

(query META region for information about the newly created table)
Hbase> select info:regioninfo from .META.;
+--------------------------------------+--------------------------------------+
| Row                                  | Cell                                 |
+--------------------------------------+--------------------------------------+
| test,,1193980167062                  | regionname: test,,1193980167062, star|
|                                      | tKey: <>, tableDesc: {name: test, fam|
|                                      | ilies: {contents:={name: contents, ma|
|                                      | x versions: 3, compression: NONE, in |
|                                      | memory: false, max length: 2147483647|
|                                      | , bloom filter: none}}}              |
+--------------------------------------+--------------------------------------+
1 row(s) in set (0.16 sec)
Hbase> exit
   --> ;

(shut down HBase...)
/cygdrive/c/hadoop/src/contrib/hbase$ bin/stop-hbase.sh
stopping master............
/cygdrive/c/hadoop/src/contrib/hbase$

---
Jim Kellerman, Senior Engineer; Powerset


> -----Original Message-----
> From: Holger Stenzhorn [mailto:[EMAIL PROTECTED]
> Sent: Thursday, November 01, 2007 2:48 PM
> To: hadoop-user@lucene.apache.org
> Subject: NoSuchElementException when creating a table
>
>
> Hi,
>
> I checked out Hadoop (including HBase) from its Subversion
> repository today, build it successfully (on Cygwin) and
> started HBase in "local" mode.
>
> Then I took your little example program from the Wiki and it
> crashes at the last line:
>     HBaseConfiguration conf = new HBaseConfiguration();
>     HTableDescriptor desc = new HTableDescriptor("test");
>     desc.addFamily(new HColumnDescriptor("content:"));
>     HBaseAdmin admin = new HBaseAdmin(conf);
>     admin.createTable(desc);
>
> ...and I get the following stacktrace:
>     java.io.IOException: java.io.IOException:
> java.util.NoSuchElementException
>         at java.util.TreeMap.key(TreeMap.java:1206)
>         at
> java.util.TreeMap$NavigableSubMap.lastKey(TreeMap.java:1435)
>         at
> java.util.Collections$SynchronizedSortedMap.lastKey(Collection
> s.java:2125)
>         at
> org.apache.hadoop.hbase.HMaster.createTable(HMaster.java:2460)
>         at
> org.apache.hadoop.hbase.HMaster.createTable(HMaster.java:2424)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccess
> orImpl.java:39)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMeth
> odAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:379)
>         at org.apache.hadoop.ipc.Server$Handler.run(Server.java:596)
>
>         at
> sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> Method)
>         at
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeCo
> nstructorAccessorImpl.java:39)
>         at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Dele
> gatingConstructorAccessorImpl.java:27)
>         at
> java.lang.reflect.Constructor.newInstance(Constructor.java:513)
>         at
> org.apache.hadoop.hbase.RemoteExceptionHandler.decodeRemoteExc
> eption(RemoteExceptionHandler.java:82)
>         at
> org.apache.hadoop.hbase.HBaseAdmin.createTableAsync(HBaseAdmin
> .java:150)
>         at
> org.apache.hadoop.hbase.HBaseAdmin.createTable(HBaseAdmin.java:119)
>         at Test.main(Test.java:19)
>
> After doing a little debugging I found the culprit line in
> org.apache.hadoop.hbase.HMaster:
>     MetaRegion m =
> (onlineMetaRegions.containsKey(newRegion.getRegionName())
> ?
>         onlineMetaRegions.get(newRegion.getRegionName()) :
>             onlineMetaRegions.get(onlineMetaRegions.headMap(
>                 newRegion.getTableDesc().getName()).lastKey()));
>
> Looking at that line and its Taking out the single statement
>     onlineMetaRegions.containsKey(newRegion.getRegionName()) --> false
>     onlineMetaRegions.get(newRegion.getRegionName()) --> null
>     newRegion.getTableDesc().getName() --> test
>
> onlineMetaRegions.headMap(newRegion.getTableDesc().getName()) --> {}
>
> onlineMetaRegions.headMap(newRegion.getTableDesc().getName()).
> lastKey()
> --> *CRASH*
>
> Does anybody else experience that? ...or is there even a
> solution for that?
>
> BTW: The same happens when I use the HBase shell... When I
> type "create table test (test);" I get the message
> "java.util.NoSuchElementException"
> also.
>
> Cheers,
> Holger
> --
> View this message in context:
> http://www.nabble.com/NoSuchElementException-when-creating-a-t
> able-tf4734280.html#a13538133
> Sent from the Hadoop Users mailing list archive at Nabble.com.
>
>

Reply via email to