Re: Improvement: Provide better feedback on Put to unknown CF

2012-07-10 Thread Jean-Marc Spaggiari
Hi Michael, I agree that in the code we have access to all the information to access the right column. However, let's imagine the column family name is dynamically retrieved from a property file, and there is a typo. Or, another process removed the column family. Or there is a bug in the code,

Re: Improvement: Provide better feedback on Put to unknown CF

2012-07-10 Thread Dhaval Shah
+1 a proper error message always helps IMHO -- On Tue 10 Jul, 2012 5:58 PM IST Jean-Marc Spaggiari wrote: Hi Michael, I agree that in the code we have access to all the information to access the right column. However, let's imagine the column family name is

Re: Improvement: Provide better feedback on Put to unknown CF

2012-07-10 Thread Michael Segel
Nobody is arguing that the exception message doesn't make sense. +1 to making better error messages. What I am suggesting is to take advantage of HBase's meta data. That is, at run time, you can query HBase to determine what tables exist, and see what column families exist. So you can avoid

Re: Improvement: Provide better feedback on Put to unknown CF

2012-07-10 Thread Ted Yu
Nice discussion here. Jean-Marc: Do you mind logging a JIRA ? Thanks On Tue, Jul 10, 2012 at 3:15 PM, Michael Segel michael_se...@hotmail.comwrote: Nobody is arguing that the exception message doesn't make sense. +1 to making better error messages. What I am suggesting is to take advantage

Improvement: Provide better feedback on Put to unknown CF

2012-07-09 Thread Jean-Marc Spaggiari
Hi, When we try to add a value to a CF which does not exist on a table, we are getting the error below. I think this is not really giving the right information about the issue. Should it not be better to provide an exception like UnknownColumnFamillyException? JM

Re: Improvement: Provide better feedback on Put to unknown CF

2012-07-09 Thread yuzhihong
I agree. On Jul 9, 2012, at 5:25 AM, Jean-Marc Spaggiari jean-m...@spaggiari.org wrote: Hi, When we try to add a value to a CF which does not exist on a table, we are getting the error below. I think this is not really giving the right information about the issue. Should it not be

Re: Improvement: Provide better feedback on Put to unknown CF

2012-07-09 Thread Michael Segel
This may beg the question ... Why do you not know the CF? Your table schemas only consist of tables and CFs. So you should know them at the start of your job or m/r Mapper.setup(); On Jul 9, 2012, at 7:25 AM, Jean-Marc Spaggiari wrote: Hi, When we try to add a value to a CF which does

Re: Improvement: Provide better feedback on Put to unknown CF

2012-07-09 Thread Jean-Marc Spaggiari
In my case it was a codding issue. Used the wrong final byte array to access the CF. So I agree, the CF is well known since you create the table based on them. But maybe you have added some other CFs later and something went wrong? It's just that based on the exception received, there is no

Re: Improvement: Provide better feedback on Put to unknown CF

2012-07-09 Thread Michael Segel
Jean-Marc, I think you mis understood. At run time, you can query HBase to find out the table schema and its column families. While I agree that you are seeing poorly written exceptions, IMHO its easier to avoid the problem in the first place. In a Map/Reduce in side the mapper class, you