arina-ielchiieva commented on a change in pull request #1962: DRILL-7554:
Convert LTSV Format Plugin to EVF
URL: https://github.com/apache/drill/pull/1962#discussion_r374570608
##########
File path:
contrib/format-ltsv/src/test/java/org/apache/drill/exec/store/ltsv/TestLTSVRecordReader.java
##########
@@ -17,84 +17,190 @@
*/
package org.apache.drill.exec.store.ltsv;
+import org.apache.drill.categories.RowSetTests;
import org.apache.drill.common.exceptions.UserException;
-import org.apache.drill.common.logical.FormatPluginConfig;
+import org.apache.drill.common.types.TypeProtos;
+import org.apache.drill.exec.ExecTest;
+import org.apache.drill.exec.physical.rowSet.RowSet;
+import org.apache.drill.exec.physical.rowSet.RowSetBuilder;
import org.apache.drill.exec.proto.UserBitShared;
-import org.apache.drill.exec.server.DrillbitContext;
-import org.apache.drill.exec.store.dfs.FileSystemConfig;
+import org.apache.drill.exec.record.metadata.SchemaBuilder;
+import org.apache.drill.exec.record.metadata.TupleMetadata;
+import org.apache.drill.exec.store.dfs.ZipCodec;
import org.apache.drill.test.ClusterFixture;
import org.apache.drill.test.ClusterTest;
+import org.apache.drill.test.QueryBuilder;
+import org.apache.drill.test.rowSet.RowSetComparison;
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.fs.CommonConfigurationKeys;
+import org.apache.hadoop.fs.FileSystem;
+import org.apache.hadoop.fs.Path;
+import org.apache.hadoop.io.IOUtils;
+import org.apache.hadoop.io.compress.CompressionCodec;
+import org.apache.hadoop.io.compress.CompressionCodecFactory;
import org.junit.BeforeClass;
import org.junit.Test;
+import org.junit.experimental.categories.Category;
-import java.util.HashMap;
-import java.util.Map;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.nio.file.Paths;
import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
+@Category(RowSetTests.class)
public class TestLTSVRecordReader extends ClusterTest {
@BeforeClass
public static void setup() throws Exception {
- startCluster(ClusterFixture.builder(dirTestWatcher));
-
- DrillbitContext context = cluster.drillbit().getContext();
- FileSystemConfig original = (FileSystemConfig)
context.getStorage().getPlugin("cp").getConfig();
- Map<String, FormatPluginConfig> newFormats = new
HashMap<>(original.getFormats());
- newFormats.put("ltsv", new LTSVFormatPluginConfig());
- FileSystemConfig pluginConfig = new
FileSystemConfig(original.getConnection(), original.getConfig(),
original.getWorkspaces(), newFormats);
- pluginConfig.setEnabled(true);
- context.getStorage().createOrUpdate("cp", pluginConfig, true);
+ ClusterTest.startCluster(ClusterFixture.builder(dirTestWatcher));
Review comment:
```suggestion
startCluster(ClusterFixture.builder(dirTestWatcher));
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services