hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Friedrich (JIRA)" <>
Subject [jira] [Created] (HIVE-8509) UT: fix list_bucket_dml_2 test
Date Fri, 17 Oct 2014 22:21:34 GMT
Thomas Friedrich created HIVE-8509:

             Summary: UT: fix list_bucket_dml_2 test
                 Key: HIVE-8509
             Project: Hive
          Issue Type: Sub-task
          Components: Spark
            Reporter: Thomas Friedrich
            Priority: Minor

The test list_bucket_dml_2 fails in FileSinkOperator.publishStats:

org.apache.hadoop.hive.ql.metadata.HiveException: [Error 30002]: StatsPublisher cannot be
connected to.There was a error while connecting to the StatsPublisher, and retrying might
help. If you dont want the query to fail because accurate statistics could not be collected,
set hive.stats.reliable=false
at org.apache.hadoop.hive.ql.exec.FileSinkOperator.publishStats(
at org.apache.hadoop.hive.ql.exec.FileSinkOperator.closeOp(
at org.apache.hadoop.hive.ql.exec.Operator.close(
at org.apache.hadoop.hive.ql.exec.Operator.close(
at org.apache.hadoop.hive.ql.exec.Operator.close(
at org.apache.hadoop.hive.ql.exec.Operator.close(
at org.apache.hadoop.hive.ql.exec.spark.SparkMapRecordHandler.close(
at org.apache.hadoop.hive.ql.exec.spark.HiveMapFunctionResultList.closeRecordProcessor(
at org.apache.hadoop.hive.ql.exec.spark.HiveBaseFunctionResultList$ResultIterator.hasNext(

I debugged and found that FileSinkOperator.publishStats throws the exception when calling
statsPublisher.connect here:
if (!statsPublisher.connect(hconf)) {
// just return, stats gathering should not block the main query
LOG.error("StatsPublishing error: cannot connect to database");
if (isStatsReliable)
{ throw new HiveException(ErrorMsg.STATSPUBLISHER_CONNECTION_ERROR.getErrorCodedMsg()); }


With the hive.stats.dbclass set to counter in data/conf/spark/hive-site.xml, the statsPuvlisher
is of type CounterStatsPublisher.
In CounterStatsPublisher, the exception is thrown because getReporter() returns null for the
MapredContext context = MapredContext.get();
if (context == null || context.getReporter() == null)
{ return false; }

When changing hive.stats.dbclass to jdbc:derby in data/conf/spark/hive-site.xml, similar to
TestCliDriver it works:
<!-- <value>counter</value> -->
<description>The default storatge that stores temporary hive statistics. Currently,
jdbc, hbase and counter type is supported</description>

In addition, I had to generate the out file for the test case for spark.

When running this test with TestCliDriver and hive.stats.dbclass set to counter, the test
case still works. The reporter is set to org.apache.hadoop.mapred.Task$TaskReporter. 

Might need some additional investigation why the CounterStatsPublisher has no reporter in
case of spark.

This message was sent by Atlassian JIRA

View raw message