Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Plain View
HBase >> mail # user >> Read access pattern


+
ricla@... 2013-04-29, 15:03
+
Shahab Yunus 2013-04-29, 15:17
+
Jean-Marc Spaggiari 2013-04-29, 16:17
+
ricla@... 2013-04-29, 17:05
+
Jean-Marc Spaggiari 2013-04-29, 18:04
+
ricla@... 2013-04-30, 13:17
+
Asaf Mesika 2013-04-30, 05:49
+
ricla@... 2013-04-30, 14:58
Copy link to this message
-
Re: Read access pattern
Geez that's a bad article.
Never salt.

And yes there's a difference between using a salt and using the first 2-4 bytes from your MD5 hash.

(Hint: Salts are random. Your hash isn't. )

Sorry to be-itch but its a bad idea and it shouldn't be propagated.

On Apr 29, 2013, at 10:17 AM, Shahab Yunus <[EMAIL PROTECTED]> wrote:

> I think you cannot use the scanner simply to to a range scan here as your
> keys are not monotonically increasing. You need to apply logic to
> decode/reverse your mechanism that you have used to hash your keys at the
> time of writing. You might want to check out the SemaText library which
> does distributed scans and seem to handle the scenarios that you want to
> implement.
> http://blog.sematext.com/2012/04/09/hbasewd-avoid-regionserver-hotspotting-despite-writing-records-with-sequential-keys/
>
>
> On Mon, Apr 29, 2013 at 11:03 AM, <[EMAIL PROTECTED]> wrote:
>
>> Hi,
>>
>> I have a rowkey defined by :
>>        getMD5AsHex(Bytes.toBytes(myObjectId)) + String.format("%19d\n",
>> (Long.MAX_VALUE - changeDate.getTime()));
>>
>> How could I get the previous and next row for a given rowkey ?
>> For instance, I have the following ordered keys :
>>
>> 00003db1b6c1e7e7d2ece41ff2184f76*9223370673172227807
>> 00003db1b6c1e7e7d2ece41ff2184f76*9223370674468022807
>>> 00003db1b6c1e7e7d2ece41ff2184f76*9223370674468862807
>> 00003db1b6c1e7e7d2ece41ff2184f76*9223370674984237807
>> 00003db1b6c1e7e7d2ece41ff2184f76*9223370674987271807
>>
>> If I choose the rowkey :
>> 00003db1b6c1e7e7d2ece41ff2184f76*9223370674468862807, what would be the
>> correct scan to get the previous and next key ?
>> Result would be :
>> 00003db1b6c1e7e7d2ece41ff2184f76*9223370674468022807
>> 00003db1b6c1e7e7d2ece41ff2184f76*9223370674984237807
>>
>> Thank you !
>> R.
>>
>> Une messagerie gratuite, garantie à vie et des services en plus, ça vous
>> tente ?
>> Je crée ma boîte mail www.laposte.net
>>
+
Shahab Yunus 2013-04-30, 16:17
+
James Taylor 2013-04-30, 16:40
+
Michael Segel 2013-04-30, 17:06
+
lars hofhansl 2013-05-01, 05:12
+
Michael Segel 2013-05-01, 14:14
+
Shahab Yunus 2013-05-01, 14:21
+
Naidu MS 2013-05-01, 07:25