Skip to content

Commit

Permalink
Remove hbase sink. Fix checkstyle issues
Browse files Browse the repository at this point in the history
  • Loading branch information
rgoers committed Mar 27, 2023
1 parent dafa94e commit 509ae57
Show file tree
Hide file tree
Showing 24 changed files with 11 additions and 4,325 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,18 @@

package org.apache.flume.sink.hive;

import java.io.IOException;
import java.util.ArrayList;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

import com.google.common.util.concurrent.ThreadFactoryBuilder;
import junit.framework.Assert;
import org.apache.flume.Context;
import org.apache.flume.event.SimpleEvent;
import org.apache.flume.instrumentation.SinkCounter;
import org.apache.hadoop.hive.cli.CliSessionState;
import org.apache.hadoop.hive.conf.HiveConf;
import org.apache.hadoop.hive.metastore.HiveMetaStore;
import org.apache.hadoop.hive.metastore.txn.TxnDbUtil;
import org.apache.hadoop.hive.ql.Driver;
import org.apache.hadoop.hive.ql.session.SessionState;
Expand All @@ -36,11 +40,6 @@
import org.junit.Test;
import org.junit.rules.TemporaryFolder;

import java.io.IOException;
import java.util.ArrayList;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public class TestHiveWriter {
static final String dbName = "testing";
static final String tblName = "alerts";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
* under the License.
*/


package org.apache.flume.sink.hive;

import org.apache.hadoop.fs.FileStatus;
Expand Down Expand Up @@ -57,14 +56,14 @@ public static void setConfValues(HiveConf conf) {
conf.setVar(HiveConf.ConfVars.HIVE_TXN_MANAGER, txnMgr);
conf.setBoolVar(HiveConf.ConfVars.HIVE_SUPPORT_CONCURRENCY, true);
conf.set("fs.raw.impl", RawFileSystem.class.getName());
try{
try {
conf.setBoolVar(HiveConf.ConfVars.METASTORE_SCHEMA_VERIFICATION, false );
conf.setVar(HiveConf.ConfVars.METASTORECONNECTURLKEY, "jdbc:derby:;databaseName=metastore_db;create=true");
conf.setVar(HiveConf.ConfVars.METASTORE_CONNECTION_DRIVER, "org.apache.derby.jdbc.EmbeddedDriver");
conf.setBoolVar(HiveConf.ConfVars.METASTORE_AUTO_CREATE_ALL, true);
conf.setIntVar(HiveConf.ConfVars.METASTORE_SERVER_PORT, 0);
conf.setVar(HiveConf.ConfVars.METASTOREWAREHOUSE, System.getProperty("java.io.tmpdir"));
}catch (Throwable t){
} catch (Throwable t) {
t.printStackTrace();
}

Expand Down Expand Up @@ -227,9 +226,9 @@ public FileStatus getFileStatus(Path path) throws IOException {
private static boolean runDDL(Driver driver, String sql) throws QueryFailedException {
int retryCount = 1; // # of times to retry if first attempt fails
for (int attempt = 0; attempt <= retryCount; ++attempt) {
driver.run(sql);
continue;
} // for
driver.run(sql);
continue;
}
return false;
}

Expand Down
209 changes: 0 additions & 209 deletions flume-ng-sinks/flume-ng-hbase-sink/pom.xml

This file was deleted.

Loading

0 comments on commit 509ae57

Please sign in to comment.