HiveWriter { public void close() throws IOException, InterruptedException { closeTxnBatch(); closeConnection(); closed = true; } HiveWriter(HiveEndPoint endPoint, int txnsPerBatch,
                      boolean autoCreatePartitions, long callTimeout,
                      ExecutorService callTimeoutPool, HiveMapper mapper, UserGroupInformation ugi); @Override String toString(); synchronized void write(final byte[] record); void flush(boolean rollToNext); void heartBeat(); int getTotalRecords(); void flushAndClose(); void close(); void abort(); long getLastUsed();  }
@Test public void testInstantiate() throws Exception { DelimitedRecordHiveMapper mapper = new DelimitedRecordHiveMapper() .withColumnFields(new Fields(colNames)) .withPartitionFields(new Fields(partNames)); HiveEndPoint endPoint = new HiveEndPoint(metaStoreURI, dbName, tblName, Arrays.asList(partitionVals)); HiveWriter writer = new HiveWriter(endPoint, 10, true, timeout ,callTimeoutPool, mapper, ugi); writer.close(); }