You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by jacques-n <gi...@git.apache.org> on 2016/01/24 19:00:27 UTC

[GitHub] drill pull request: DRILL-4291: Fix Missing classes when trying to...

GitHub user jacques-n opened a pull request:

    https://github.com/apache/drill/pull/336

    DRILL-4291: Fix Missing classes when trying to query varchar[] using jdbc-all

    - Create a new simplified version of the Hadoop Text class that doesn't include massive dependencies.
    - Update Vectors to use new Text class.
    - Update the jdbc-all module to have a test which also includes complex types.
    - Clean up exclusions in Jdbc jar file to reduce file size.
    - Add an enforcer rule that ensures the adbc-all jar exclusions are maintained in the future.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/jacques-n/drill DRILL-4291

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/drill/pull/336.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #336
    
----
commit 09d7c0c06f12203ae611f8e4733bba2ce7329c03
Author: Jacques Nadeau <ja...@apache.org>
Date:   2016-01-24T17:59:12Z

    DRILL-4291: Fix Missing classes when trying to query varchar[] using JDBC
    
    - Create a new simplified version of the Hadoop Text class that doesn't include massive dependencies.
    - Update Vectors to use new Text class.
    - Update the jdbc-all module to have a test which also includes complex types.
    - Clean up exclusions in Jdbc jar file to reduce file size.
    - Add an enforcer rule that ensures the adbc-all jar exclusions are maintained in the future.

----


---
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.
---

[GitHub] drill pull request: DRILL-4291: Fix Missing classes when trying to...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/drill/pull/336


---
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.
---

[GitHub] drill pull request: DRILL-4291: Fix Missing classes when trying to...

Posted by jaltekruse <gi...@git.apache.org>.
Github user jaltekruse commented on the pull request:

    https://github.com/apache/drill/pull/336#issuecomment-174627297
  
    +1


---
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.
---

[GitHub] drill pull request: DRILL-4291: Fix Missing classes when trying to...

Posted by jaltekruse <gi...@git.apache.org>.
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.
---

[GitHub] drill pull request: DRILL-4291: Fix Missing classes when trying to...

Posted by jacques-n <gi...@git.apache.org>.
Github user jacques-n commented on a diff in the pull request:

    https://github.com/apache/drill/pull/336#discussion_r51083291
  
    --- 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 --
    
    I took this from the source jar of the Hadoop 2.7.1 release, not a particular commit. That is why I noted that origin in the comment at the top of the file. Looking at how Hadoop tags, that looks it is the same as ac0538aac347bfd97cc0dee1db49db503c15f1d9 but I think the version number should suffice. Good idea on the two commits. I'll do that in the future if I need to do this kind of thing again. 


---
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.
---