Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-18215

Enhance WritableName to be able to return aliases for classes that use serializers

VotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Reviewed
    • Hide
      If you have a SequenceFile with an old key or value class which has been renamed, you can use WritableName.addName to add an alias class. This functionality previously existed, but only worked for classes which extend Writable. It now works for any class, notably key or value classes which use io.serializations.
      Show
      If you have a SequenceFile with an old key or value class which has been renamed, you can use WritableName.addName to add an alias class. This functionality previously existed, but only worked for classes which extend Writable. It now works for any class, notably key or value classes which use io.serializations.

    Description

      WritableName allows users shim in aliases for writables, in the case where a SequenceFile was written with a Writable class that has since been renamed or moved to another package. However, this requires that the aliased class extend Writable. 

      Separately it's possible to configure jobs with keys and values which don't actually extend Writable. Instead they are meant to be serialized/deserialized using the serialization classes defined in io.serializations config.

      Unfortunately, the current implementation does not support these key/value classes. All we need to do to support this is remove the .asSubclass(Writable.class) as is already the case for the default.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            bbeaudreault Bryan Beaudreault
            bbeaudreault Bryan Beaudreault
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 1.5h
                1.5h

                Slack

                  Issue deployment