Re: Overwrite a row

2015-01-27 Thread sriram
Thanks Lars for additional info. Will try that. Thanks, Sriram -- View this message in context: http://apache-hbase.679495.n3.nabble.com/Re-Overwrite-a-row-tp4067918p4067935.html Sent from the HBase User mailing list archive at Nabble.com.

Re: Overwrite a row

2015-01-27 Thread lars hofhansl
:07 PM Subject: Re: Overwrite a row Yes Ted. So what I am facing is, My hbase is already having a record. For example) Consider it to be having 20 fields. Now I am going to replace those 20 fields with only 10 fields. Hence I create a RowMutation with Put object having only those 10 fields and

Re: Overwrite a row

2015-01-27 Thread sriram
.nabble.com/Re-Overwrite-a-row-tp4067918p4067926.html Sent from the HBase User mailing list archive at Nabble.com.

Re: Overwrite a row

2015-01-27 Thread Ted Yu
Have you seen http://search-hadoop.com/m/3rLhsinhQ ? bq. they are empty I assume the above is the same as 'absent' in your mutation. Cheers On Tue, Jan 27, 2015 at 1:19 PM, Sriram V wrote: > Hi Ted, > > I am referring to > http://grokbase.com/p/hbase/user/134kvzt6ah/overwrite-a-row Does this

Re: Overwrite a row

2015-01-27 Thread Sriram V
Hi Ted, I am referring to http://grokbase.com/p/hbase/user/134kvzt6ah/overwrite-a-row Does this mean that if I am using hbase 0.94.6, the mutate row option will not remove the previously present column qualifiers if they are empty in my latest update? Thanks, Sriram

Re: Overwrite a row

2013-04-22 Thread Kristoffer Sjögren
Interesting. RowMutation is a great API improvement, I shall have a look at multirowmutation as well. Thanks! On Sun, Apr 21, 2013 at 9:39 AM, Anoop John wrote: > You can use MultiRowMutationEndpoint for atomic op on multiple rows (within > same region).. > > > On Sun, Apr 21, 2013 at 5:55 AM,

Re: Overwrite a row

2013-04-22 Thread Mohamed Ibrahim
Just noticed you want to delete as well. I think that's supported since 0.95 in mutateRow ( http://hbase.apache.org/apidocs/org/apache/hadoop/hbase/client/HTable.html#mutateRow(org.apache.hadoop.hbase.client.RowMutations) ). You can do multiple puts and deletes and they will be performed atomically

Re: Overwrite a row

2013-04-21 Thread Anoop John
You can use MultiRowMutationEndpoint for atomic op on multiple rows (within same region).. On Sun, Apr 21, 2013 at 5:55 AM, Ted Yu wrote: > Here is code from 0.94 code base: > > public void mutateRow(final RowMutations rm) throws IOException { > new ServerCallable(connection, tableName, r

Re: Overwrite a row

2013-04-20 Thread Ted Yu
Here is code from 0.94 code base: public void mutateRow(final RowMutations rm) throws IOException { new ServerCallable(connection, tableName, rm.getRow(), operationTimeout) { public Void call() throws IOException { server.mutateRow(location.getRegionInfo().getRegionName

Re: Overwrite a row

2013-04-20 Thread Kristoffer Sjögren
Just to absolutely be clear, is this also true for a batch that span multiple rows? On Sat, Apr 20, 2013 at 2:42 PM, Ted Yu wrote: > Operations within each batch are atomic. > They would either all succeed or all fail. > > Time stamps would all refer to the latest cell (KeyVal). > > Cheers > >

Re: Overwrite a row

2013-04-20 Thread Ted Yu
Operations within each batch are atomic. They would either all succeed or all fail. Time stamps would all refer to the latest cell (KeyVal). Cheers On Apr 20, 2013, at 12:17 AM, Kristoffer Sjögren wrote: > The schema is known beforehand so this is exactly what I need. Great! > > One more q

Re: Overwrite a row

2013-04-20 Thread Kristoffer Sjögren
The schema is known beforehand so this is exactly what I need. Great! One more question. What guarantees does the batch operation have? Are the operations contained within each batch atomic? I.e. all mutations will be given the same timestamp? If something fails, all operation fail or can it fail

Re: Overwrite a row

2013-04-19 Thread Ted Yu
I don't know details about Kristoffer's schema. If all the column qualifiers are known a priori, mutateRow() should serve his needs. HBase allows arbitrary number of columns in a column family. If the schema is dynamic, mutateRow() wouldn't suffice. If the column qualifiers are known but the row i

Re: Overwrite a row

2013-04-19 Thread Mohamed Ibrahim
Hello Kristoffer, HBase row mutations are atomic ( http://hbase.apache.org/acid-semantics.html ), which include put . So when you overwrite a row it is not possible for another processes to read half old / half new data. They will either read all old or all new data if the put succeeds. It is also

Re: Overwrite a row

2013-04-19 Thread Mohamed Ibrahim
It seems that 0.95 is not released yet, mutateRow won't be a solution for now. I saw it in the downloads and I thought it was released. On Fri, Apr 19, 2013 at 4:18 PM, Mohamed Ibrahim wrote: > Just noticed you want to delete as well. I think that's supported since > 0.95 in mutateRow ( > http:/

Re: Overwrite a row

2013-04-19 Thread Mohamed Ibrahim
Actually I do see it in the 0.94 JavaDocs ( http://hbase.apache.org/0.94/apidocs/org/apache/hadoop/hbase/client/HTable.html#mutateRow(org.apache.hadoop.hbase.client.RowMutations) ), so may be it was added in 0.94.6 even though the jira says fixed in 0.95 . I haven't used it though, but it seems tha

Re: Overwrite a row

2013-04-19 Thread Ted Yu
If the maximum number of versions is set to 1 for your table, you would already have what you wanted. Normally max versions being 1 is not desired, that was why I asked about your use case. Cheers On Fri, Apr 19, 2013 at 12:44 PM, Kristoffer Sjögren wrote: > What would you suggest? I want the o

Re: Overwrite a row

2013-04-19 Thread Kristoffer Sjögren
What would you suggest? I want the operation to be atomic. On Fri, Apr 19, 2013 at 8:32 PM, Ted Yu wrote: > What is the maximum number of versions do you allow for the underlying > table ? > > Thanks > > On Fri, Apr 19, 2013 at 10:53 AM, Kristoffer Sjögren >wrote: > > > Hi > > > > Is it possib

Re: Overwrite a row

2013-04-19 Thread Ted Yu
What is the maximum number of versions do you allow for the underlying table ? Thanks On Fri, Apr 19, 2013 at 10:53 AM, Kristoffer Sjögren wrote: > Hi > > Is it possible to completely overwrite/replace a row in a single _atomic_ > action? Already existing columns and qualifiers should be removed