Is there an upper limit for the length of strings?

I want to know if there is a maximum length for row key values ​​in Google BigTable.

I know the documentation recommends hashing as a potential solution for generating keys of equal length, but in my scenario I can better group related data if I include the file path in my key.

+3


source to share


2 answers


In Bigtable cloud:

The maximum length for row keys is 4KB.



The maximum length for column classifiers is 16 KiB.

This information is located on the Quotas and Limits page in the documentation.

+7


source


We recommend relatively short line keys, but the file path should be ok. The only thing you want to make sure is that there is some uniqueness at the beginning of the key.

Those. if you add something like:

/Users/lesv/Downloads/abc.java
/Users/lesv/Downloads/abc.res
/Users/lesv/Downloads/def.java

      



It might be better to invert the path like this:

java.abc/Downloads/lesv/Users
res.abc/Downloads/lesv/Users
java.def/Downloads/lesv/Users

      

To get some uniqueness at the beginning of the path.

+3


source







All Articles