29 / 34

HBase-Data Location

Not able to play video? Try with youtube

The data for tables is located in the following folder in hdfs /apps/hbase/data/data/default. The data for tables is located in the following folder /apps/hbase in hdfs inside that folder there is data and again another data folder here the namespaces are stored since our table does not have any namespace our data is stored in a folder with the name default let's take a look open web console type hadoop fs -ls /apps/hbase/data/data/default followed by the table name which is mayank8645_console. There you will find a directory for regions by default there is only one region but if the table has many rows you will see many such directories. Here let us take a look at the first reason using hadoop fs -ls command inside every region you will see data grouped based on column family that is why there is a directory representing the column family here inside the column family you will see the file representing the data let us take a look at the anchors directory using hadoop fs -ls followed by the directory of the region followed by the column family name which is anchors you can see that there are files in it by default the data in these files is in binary format we cannot view the binary data but using the tools such as strings we can extract just the strings to view strings in the file type the command hadoop fs -cat followed by the path of the file and then type pipe followed by strings this command will fetch only the strings present in our file which makes it easier to read data alternatively you can use dash get command to download the file in your linux current directory and from there you can view it with hexdump -c followed by the file name this would open the binary file

Loading comments...