ihuzenko commented on a change in pull request #1613: DRILL-6977: Improve Hive tests configuration URL: https://github.com/apache/drill/pull/1613#discussion_r249470348
########## File path: contrib/storage-hive/core/src/test/java/org/apache/drill/exec/hive/HiveTestFixture.java ########## @@ -0,0 +1,263 @@ +/* + * 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.hive; + +import java.io.File; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.function.Consumer; + +import org.apache.drill.common.exceptions.ErrorHelper; +import org.apache.drill.common.exceptions.ExecutionSetupException; +import org.apache.drill.exec.server.Drillbit; +import org.apache.drill.exec.store.StoragePluginRegistry; +import org.apache.drill.exec.store.hive.HiveStoragePlugin; +import org.apache.drill.exec.store.hive.HiveStoragePluginConfig; +import org.apache.drill.test.BaseDirTestWatcher; +import org.apache.hadoop.fs.FileSystem; +import org.apache.hadoop.hive.conf.HiveConf; +import org.apache.hadoop.hive.conf.HiveConf.ConfVars; +import org.apache.hadoop.hive.ql.Driver; +import org.apache.hadoop.hive.ql.session.SessionState; + +import static java.util.Objects.nonNull; +import static java.util.Objects.requireNonNull; +import static org.apache.drill.exec.hive.HiveTestUtilities.createDirWithPosixPermissions; + + +/** + * Test fixture for configuration of Hive tests, which + * allows granular control over initialization of test data + * and hive storage plugin. + * <p> + * Below is example of usage HiveTestFixture along with ClusterFixture: + * <p> + * <pre><code> + * // Note that HiveTestFixture don't require extension of ClusterTest, Review comment: fixed ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services