0 Replies Latest reply: Sep 28, 2012 2:11 AM by 965003 RSS

    KVInputFormat corrupting serialized objects

    965003
      Hello,

      I am using Oracle NoSQL database for some research project and I have hit an issue I am unsure how to solve. When using the KVInputFormat to pass data from the db into Hadoop the infrastructural corrupts my byte array. As I understand the problem boils down to the infrastructure uses the toString function as per documentation. Unfortunately I am storing serialized object in the db which can contain negative numbers. A String in essence distills down to a char array which only accepts values [0 - 65535] hence all negative number are not handled. Below is a byte array I have retried from the NoSQL database directly and through KVInputFormat

      Original -84 -19 0 5 117 114 0 2 91 74 120 32 4 -75 18 -79 117 -109 2 0 0 120 112
      KVInputFormat: -17 -65 -67 -17 -65 -67 0 5 117 114 0 2 91 74 120 32 4 -17 -65 -67 18 -17 -65 -67 117 -17 -65 -67 2 0 0 120 112

      Is there any solution for this issue (other than writing my own KVInputFormat), or am I just doing something really stupid (its a distinct possibility it has happened in the past).

      Greatly appreciate any assistance
      Alex