drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jaltekruse <...@git.apache.org>
Subject [GitHub] drill pull request: DRILL-4291: Fix Missing classes when trying to...
Date Mon, 25 Jan 2016 19:19:09 GMT
Github user jaltekruse commented on a diff in the pull request:

    https://github.com/apache/drill/pull/336#discussion_r50741405
  
    --- Diff: exec/vector/src/main/java/org/apache/drill/exec/util/Text.java ---
    @@ -0,0 +1,612 @@
    +/**
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + * http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +package org.apache.drill.exec.util;
    +
    +import java.io.DataInput;
    +import java.io.IOException;
    +import java.nio.ByteBuffer;
    +import java.nio.CharBuffer;
    +import java.nio.charset.CharacterCodingException;
    +import java.nio.charset.Charset;
    +import java.nio.charset.CharsetDecoder;
    +import java.nio.charset.CharsetEncoder;
    +import java.nio.charset.CodingErrorAction;
    +import java.nio.charset.MalformedInputException;
    +import java.text.CharacterIterator;
    +import java.text.StringCharacterIterator;
    +import java.util.Arrays;
    +
    +import com.fasterxml.jackson.core.JsonGenerationException;
    +import com.fasterxml.jackson.core.JsonGenerator;
    +import com.fasterxml.jackson.databind.SerializerProvider;
    +import com.fasterxml.jackson.databind.annotation.JsonSerialize;
    +import com.fasterxml.jackson.databind.ser.std.StdSerializer;
    +
    +/**
    + * A simplified byte wrapper similar to Hadoop's Text class without all the dependencies.
Lifted from Hadoop 2.7.1
    + */
    +@JsonSerialize(using = Text.TextSerializer.class)
    +public class Text {
    --- End diff --
    
    Because a few real changes were made to this class (it isn't just copying the source to
avoid including the jar that contains it) it would be good to have an explicit pointer to
the version of this class that this was based on. Is this pulled out of the Hadoop source
at the commit tagged for the 2.7.1 release?
    
    It might have been cleaner to do this in two commits, one just checking in the class exactly
as it appears in Hadoop, with just the packaged changed and a follow up commit the with refactoring
to remove the dependencies imported in the hadoop version of the class. At least a mention
of a commit ID this was pulled out of would give a pointer to the exact version this was based
on if we ever had to apply a patch from Hadoop mainline that didn't merge cleanly.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message