You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by GitBox <gi...@apache.org> on 2018/11/06 19:40:50 UTC

[GitHub] jcmcote commented on a change in pull request #1500: DRILL-6820: Msgpack format reader

jcmcote commented on a change in pull request #1500: DRILL-6820: Msgpack format reader
URL: https://github.com/apache/drill/pull/1500#discussion_r231264607
 
 

 ##########
 File path: contrib/codec-zstd/src/main/java/org/apache/hadoop/io/compress/zstd/ZstdDecompressor.java
 ##########
 @@ -0,0 +1,270 @@
+/*
+ * 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.hadoop.io.compress.zstd;
+
+import java.io.IOException;
+import java.nio.ByteBuffer;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.hadoop.io.compress.Decompressor;
+
+import com.github.luben.zstd.ZstdDirectBufferDecompressingStream;
+import com.github.luben.zstd.util.Native;
+
+/**
+ * A {@link Decompressor} based on the zstandard compression algorithm.
+ */
+public class ZstdDecompressor implements Decompressor {
+  private static final Log LOG = LogFactory.getLog(ZstdDecompressor.class.getName());
 
 Review comment:
   These classes are an implementation of the Hadoop codec. For example when drill reads gz files it is relying on the Hadoop library to handle gzip decompression.
   
   The way you contribute a new codec is via the Java Service Plugin mechanism. That is META-INF/services folder.
   
   I've implemented the interface org.apache.hadoop.io.compress.CompressionCodec using the zstandard java library.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services