1

I am using the HBase Shell and I have created a table with name 'student' and a column family called 'studentData'.

create 'student', 'studentData'

In the column family I have columns such as 'studentData:name', studentData:surname' and I have filled the table with data.

     ROW                                COLUMN+CELL                                                                                        
     1                                 column=studentData:name, timestamp=1489151422978, value=John                                       
     1                                 column=studentData:surname, timestamp=1489151401190, value=Black                                   
     2                                 column=studentData:name, timestamp=1489151432721, value=Kate                                       
     2                                 column=studentData:surname, timestamp=1489151447623, value=Red
    ...                                ...
    ...                                ...

I would like to rename the column family from 'studentData' to 'data', without deleting the data which are stored in the columns which are under the column family, but unfortunately I have not found a way to do that yet.

In case you have any idea, how to rename a column family, please let me know.

Origamer7
  • 315
  • 3
  • 17
  • 1
    http://stackoverflow.com/questions/35024620/how-to-change-the-name-of-column-family-in-the-hbase-table/35030749#35030749 and http://stackoverflow.com/questions/35418617/how-to-rename-a-column-family-in-hbase-using-hbase-shell – OneCricketeer Mar 10 '17 at 13:45

1 Answers1

1

We can not.

A column family cannot be renamed. The common approach to rename a family is to create a new family with the desired name and copy the data over, using the API.

Reference Hbase - The Definitve Guide.