Re: How to delete an Indexed HTable

2009-07-08 Thread Ramesh.Ramasamy
Sorry, I had bug in my code, that throws the TableNotFoundException. This piece of code worked out deleting both tables ('ITable' and 'ITable-A') private static final String TABLENAME = "ITable"; private IndexedTableAdmin admin = new IndexedTableAdmin(getConf()); if (admin.tableExists(B

Re: Best practices in ID generation?

2009-07-08 Thread Saptarshi Guha
Hello, I am a new Hbase user. With reference to the web page mentioned (at streamy), i quote this "t’s very important that each of these fields is fixed-length and binary so that the lexicographical/ascending byte-ordering of HBase will properly sort our rows." Let my row keys be vectors, Suppose

Re: Text keys for hbase 0.20 using TableMap

2009-07-08 Thread Doğacan Güney
On Wed, Jul 8, 2009 at 21:06, stack wrote: > Text keys were deprecated a good while ago. Keys and values are byte > arrays > in hbase. If you want the key to be Text, add the Text bytes and then make > a new Text on fetching. > > The new mapreduce package -- as opposed to mapred following our p

Re: Best practices in ID generation?

2009-07-08 Thread Jonathan Gray
Ah yeah, there's some good info in that post. Thanks for remembering better than me, Guilherme :) Guilherme Germoglio wrote: You may also want to read this blog post: http://devblog.streamy.com/2009/04/23/hbase-row-key-design-for-paging-limit-offset-queries/ It contains a great lesson on desig

Re: Best practices in ID generation?

2009-07-08 Thread Guilherme Germoglio
You may also want to read this blog post: http://devblog.streamy.com/2009/04/23/hbase-row-key-design-for-paging-limit-offset-queries/ It contains a great lesson on designing keys in order to enable results paging (maybe it only needs to be updated to 0.20 api). On Wed, Jul 8, 2009 at 3:57 PM, Vai

Re: how to add table

2009-07-08 Thread Vaibhav Puranik
Stack, We are using the trunk. Thanks for the update. Regards, Vaibhav On Wed, Jul 8, 2009 at 11:44 AM, stack wrote: > Fleming is referring to the fact that you need to have hbase conf in your > CLASSPATH for things to run (one of the things in conf is zoo.cfg with > pointer to the zookeeper t

Re: Best practices in ID generation?

2009-07-08 Thread Vaibhav Puranik
Thanks for your help Jon and Brian. IncrementColumnValues seems promising to us because we would like to have rows ordered by insertion time. Regards, Vaibhav On Wed, Jul 8, 2009 at 11:36 AM, Jonathan Gray wrote: > Right, BD. > > We use incrementing IDs for most things because it gives us orde

Re: TableNotDisabled Exception

2009-07-08 Thread stack
Try running disable again if drop complains it not disabled. St.Ack On Wed, Jul 8, 2009 at 7:18 AM, bharath vissapragada < bhara...@students.iiit.ac.in> wrote: > Hi all, > > I Have run a java program and it created a table named "users" . I have > made some modifications to the code and i want t

Re: how to add table

2009-07-08 Thread stack
Fleming is referring to the fact that you need to have hbase conf in your CLASSPATH for things to run (one of the things in conf is zoo.cfg with pointer to the zookeeper to use). How we point at zookeeper is about to change in TRUNK again soon but as long as you have hbase conf in your CLASSPATH,

Re: Best practices in ID generation?

2009-07-08 Thread Jonathan Gray
Right, BD. We use incrementing IDs for most things because it gives us ordering. If you only have random-key access, you would be better suited using UUID-style IDs as Bryan says. Bryan Duxbury wrote: Not necessarily in context of hbase, but Rapleaf uses UUIDs/GUIDs, since they are crazy fas

Re: Best practices in ID generation?

2009-07-08 Thread Bryan Duxbury
Not necessarily in context of hbase, but Rapleaf uses UUIDs/GUIDs, since they are crazy fast to generate and have no dependencies on external resources. In the context of hbase, a benefit of UUIDs is that they will be randomly distributed over your whole table, instead of consistently sho

Re: Best practices in ID generation?

2009-07-08 Thread Jonathan Gray
There are a number of different ways you could generate IDs. Some people use GUIDs, probably the simplest way, though not my recommendation. ZooKeeper as a facility for ID generation. Here, we use HBase for ID generation. Currently in production, which is running on 0.19, I run a custom pat

Re: Text keys for hbase 0.20 using TableMap

2009-07-08 Thread stack
Text keys were deprecated a good while ago. Keys and values are byte arrays in hbase. If you want the key to be Text, add the Text bytes and then make a new Text on fetching. The new mapreduce package -- as opposed to mapred following our parent's model -- has new MR classes but TableMapper (sic

Re: Adding/Removing regionservers

2009-07-08 Thread llpind
Okay will do. I'm new to scanners & regions still. HTable has a getRegionInfo() method which returns Map . I can iterate over this and spawn scanners per region given a start/stop. I'm a bit confused how I put my start/stop rows in then? In my loops I have a start/stop row as well. Basically

Text keys for hbase 0.20 using TableMap

2009-07-08 Thread Yair Even-Zohar
I'm trying to import my 0.19 code to 0.20 and am running into a problem using the TableMap interface. It seems like I can not construct table key of Text class and read a table using TableMap because of the comperator differences. Has anybody run into this problem and if so, what is the sugges

Best practices in ID generation?

2009-07-08 Thread Vaibhav Puranik
Hi, Does anybody have any suggestion/best practices on id/row/key generation for HBase rows? Do people use sequential ids (like rdbms - 1,2,3,4...) or people use strings ids? What id server do you use? Do we have to write our own? Any help/experiences please?. Regards, Vaibhav

Re: TableNotDisabled Exception

2009-07-08 Thread Jean-Daniel Cryans
You have to disable a table to change its schema. Do it either by shell like you already did or via HBaseAdmin (which shell uses). J-D On Wed, Jul 8, 2009 at 10:18 AM, bharath vissapragada wrote: > Hi all, > > I Have run a java program and it created  a table named "users" . I have > made some mo

Re: how to add table

2009-07-08 Thread Vaibhav Puranik
Fleming, We are trying to use HBase 0.20. Your answer is very helpful. Looks like Table creation is not changed in 0.20. But what do you mean by - "Don't forget to put your zookeeper configure(zoo.cfg) with your java class"? Can you please elaborate? Regards, Vaibhav Gumgum Inc. On Tue, Jul 7,

TableNotDisabled Exception

2009-07-08 Thread bharath vissapragada
Hi all, I Have run a java program and it created a table named "users" . I have made some modifications to the code and i want to run it again . So i tried to delete the existing table using "hbase shell" . When i tried to issue the command "drop 'users'" it said "Disable the table first".. Then

RE: how safe table permanently in hbase

2009-07-08 Thread Hegner, Travis
Hi Muhammad, I am new to Hbase myself, but I think I can help. The default data storage location for Hbase is in your /tmp directory, which is emptied by default on every reboot. Examine the conf/hbase-default.xml file for the "hbase.rootdir" property syntax, then over-ride the default in your

Re: how safe table permanently in hbase

2009-07-08 Thread Jean-Daniel Cryans
Muhammad, Are you shutting down HBase properly e.g. ./bin/stop-hbase.sh ? Did you change Hadoop data dir (which defaults to /tmp which is wiped out regularly) ? You can view data by using the shell http://wiki.apache.org/hadoop/Hbase/Shell J-D On Wed, Jul 8, 2009 at 9:33 AM, Muhammad Mudassar w

Re: Exception while running a hbase program

2009-07-08 Thread Jean-Daniel Cryans
I think you are mixing up some things here. HBase is not MySQL compliant nor it is SQL compliant at all. You have to use the HBase API. See http://hadoop.apache.org/hbase/docs/r0.19.3/api/overview-summary.html#overview_description J-D On Wed, Jul 8, 2009 at 8:16 AM, bharath vissapragada wrote: >

how safe table permanently in hbase

2009-07-08 Thread Muhammad Mudassar
Hi I m working on single node hadoop/hbase framework i have created some tables and added some data I want to ask how i can save these tables permanently in hbase as when i restart hbase tables are not present there. i aslo want to ask how to view data stored in all rows of a table in hbase shell

How to delete an Indexed HTable

2009-07-08 Thread Ramesh.Ramasamy
Hi there, I'm got created an indexed table 'ITable-A' of 'ITable'. I'm using HTable (0.19.1) deleteTable(str) method to delete both tables. But, I'm getting TableNotFoundException, on deleting the 'ITable' after deleting 'ITable'. The reverse too fails.. Is there any other deleteTable(str) which

Exception while running a hbase program

2009-07-08 Thread bharath vissapragada
Hi all, I have written a hbase program in java and when i try to run it on hbase it gives an error (i've pasted it below). I m trying to run it locally i.e, no other systems are involved ,hbase runs only on my machine . I have just set the "JAVA_HOME" variable in "hbase-env.sh" and then i have iss

Re: region offline

2009-07-08 Thread y_823910
It shows region offline exception message while I trying to disable table. Ryan Rawson

Re: region offline

2009-07-08 Thread Ryan Rawson
Try enable table, then disable again? I run into situations where i have to enable the table. Weird admin bugs like this are due to deep structural issues set to be reworked in hbase 0.21. One last reminder, make sure you: major_compact '.META.' if you make major changes such as: - drop a large

Re: region offline

2009-07-08 Thread y_823910
It's no use ! Amandeep Khurana

Re: region offline

2009-07-08 Thread Amandeep Khurana
Try restarting hbase. On 7/8/09, y_823...@tsmc.com wrote: > Hi, > I want to disable my table from shell, but it shows region offline. > Any ways I can recover from this problem? > Thank you > > Fleming > --- >

region offline

2009-07-08 Thread y_823910
Hi, I want to disable my table from shell, but it shows region offline. Any ways I can recover from this problem? Thank you Fleming --- TSMC PROPERTY This emai