Options
- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Solved
Go to solution
HBase - Get region start from one shell command
Labels:
- Labels:
-
Apache HBase
-
HDFS
Champion Alumni
Created on ‎01-07-2016 07:48 AM - edited ‎09-16-2022 02:56 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I want to do a script that decides where to move each region. For that I want to use the command:
move ERROR: wrong number of arguments (0 for 1) Here is some help for this command: Move a region. Optionally specify target regionserver else we choose one at random. NOTE: You pass the encoded region name, not the region name so this command is a little different to the others. The encoded region name is the hash suffix on region names: e.g. if the region name were TestTable,0094429456,1289497600452.527db22f95c8a9e0116f0cc13c680396. then the encoded region name portion is 527db22f95c8a9e0116f0cc13c680396 A server name is its host, port plus startcode. For example: host187.example.com,60020,1289493121758 Examples: hbase> move 'ENCODED_REGIONNAME' hbase> move 'ENCODED_REGIONNAME', 'SERVER_NAME'
For that I started to use the
hdfs dfs -du "/hbase/data/default_table_name/"
in order to find the region names.
However, I do not know, if there si a shell command to find out the startcode for each region (?).
Thank you!
GHERMAN Alina
1 ACCEPTED SOLUTION
Mentor
Created ‎02-18-2016 01:03 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can get your live RegionServer IDs with startcodes included via the HBase Shell command: status 'simple'
An output line from this, such as the below:
host.cloudera.com:60020 1455726247381
Can then be converted into the right format:
host.cloudera.com,22101,1455726247381
An output line from this, such as the below:
host.cloudera.com:60020 1455726247381
Can then be converted into the right format:
host.cloudera.com,22101,1455726247381
1 REPLY 1
Mentor
Created ‎02-18-2016 01:03 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can get your live RegionServer IDs with startcodes included via the HBase Shell command: status 'simple'
An output line from this, such as the below:
host.cloudera.com:60020 1455726247381
Can then be converted into the right format:
host.cloudera.com,22101,1455726247381
An output line from this, such as the below:
host.cloudera.com:60020 1455726247381
Can then be converted into the right format:
host.cloudera.com,22101,1455726247381
