0

I am new to HBase. Below is what i am trying to achieve: 1. How to convert .pdf or .png to hbase readable format? 2. How to import these files in hbase table? (store metadata in one cf and object in another cf)

Can anyone share example on this? Any other suggestions are helpful.

Ram Ghadiyaram
  • 28,239
  • 13
  • 95
  • 121
Hellboy
  • 29
  • 6

1 Answers1

0

For an image See my answer. For PDF also this will work since we are trying to store in most primitive way that is byte array. Suggest you to use Serialization Utils for pdf as described in my example in the answer.

OR

Use Apache Commons IO org.apache.commons.io.FileUtils.readFileToByteArray(File file) which return data of type byte[].

Also check this

Community
  • 1
  • 1
Ram Ghadiyaram
  • 28,239
  • 13
  • 95
  • 121