Re: Cannot initiate connection as SYSTEM:CATALOG is found but client does not have phoenix.schema.isNamespaceMappingEnabled enabled

2020-08-10 Thread swaroopa kadam
Hi,

You will also need to make the client side change for namespace enabled
property. The config file is in same location as sqlline.py
(Phoenix/bin/hbase-site.xml)

Hope this helps.

On Mon, Aug 10, 2020 at 9:42 PM Zhou Zach  wrote:

> Hi all,
> When I run the code, I got a error:
>
>
>
> *HBASE_CLASSPATH_PREFIX=/opt/cloudera/parcels/PHOENIX/lib/phoenix/lib/*:/etc/hbase/conf
>  \> /opt/cloudera/parcels/CDH/lib/hbase/bin/hbase 
> org.apache.phoenix.mapreduce.index.IndexTool \> --schema ods --data-table 
> USER_FLINK8 --index-table user_flink8_ctime_idx --output-path 
> hdfs://nameservice1/phoenix*
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> *SLF4J: Class path contains multiple SLF4J bindings.SLF4J: Found binding in 
> [jar:file:/opt/cloudera/parcels/CDH-6.3.2-1.cdh6.3.2.p0.1605554/lib/hbase/lib/hbase-hbck2-1.1.0-SNAPSHOT.jar!/org/slf4j/impl/StaticLoggerBinder.class]SLF4J:
>  Found binding in 
> [jar:file:/opt/cloudera/parcels/CDH-6.3.2-1.cdh6.3.2.p0.1605554/jars/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]SLF4J:
>  See http://www.slf4j.org/codes.html#multiple_bindings 
> <http://www.slf4j.org/codes.html#multiple_bindings> for an explanation.SLF4J: 
> Actual binding is of type 
> [org.apache.logging.slf4j.Log4jLoggerFactory]11:56:08.182 [main] INFO  
> org.apache.phoenix.query.ConnectionQueryServicesImpl - An instance of 
> ConnectionQueryServices was created.11:56:08.536 [main] INFO  
> org.apache.phoenix.query.ConnectionQueryServicesImpl - HConnection 
> established. Stacktrace for informational purposes: hconnection-0x18cebaa5 
> java.lang.Thread.getStackTrace(Thread.java:1559)org.apache.phoenix.util.LogUtil.getCallerStackTrace(LogUtil.java:55)org.apache.phoenix.query.ConnectionQueryServicesImpl.openConnection(ConnectionQueryServicesImpl.java:433)org.apache.phoenix.query.ConnectionQueryServicesImpl.access$400(ConnectionQueryServicesImpl.java:273)org.apache.phoenix.query.ConnectionQueryServicesImpl$12.call(ConnectionQueryServicesImpl.java:2557)org.apache.phoenix.query.ConnectionQueryServicesImpl$12.call(ConnectionQueryServicesImpl.java:2533)org.apache.phoenix.util.PhoenixContextExecutor.call(PhoenixContextExecutor.java:76)org.apache.phoenix.query.ConnectionQueryServicesImpl.init(ConnectionQueryServicesImpl.java:2533)org.apache.phoenix.jdbc.PhoenixDriver.getConnectionQueryServices(PhoenixDriver.java:255)org.apache.phoenix.jdbc.PhoenixEmbeddedDriver.createConnection(PhoenixEmbeddedDriver.java:150)org.apache.phoenix.jdbc.PhoenixDriver.connect(PhoenixDriver.java:221)java.sql.DriverManager.getConnection(DriverManager.java:664)java.sql.DriverManager.getConnection(DriverManager.java:208)org.apache.phoenix.mapreduce.util.ConnectionUtil.getConnection(ConnectionUtil.java:113)org.apache.phoenix.mapreduce.util.ConnectionUtil.getInputConnection(ConnectionUtil.java:58)org.apache.phoenix.mapreduce.util.ConnectionUtil.getInputConnection(ConnectionUtil.java:46)org.apache.phoenix.mapreduce.index.IndexTool.run(IndexTool.java:536)org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:76)org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:90)org.apache.phoenix.mapreduce.index.IndexTool.main(IndexTool.java:769)11:56:09.652
>  [main] ERROR org.apache.phoenix.mapreduce.index.IndexTool - An exception 
> occurred while performing the indexing job: SQLException: ERROR 726 (43M10):  
> Inconsistent namespace mapping properties. Cannot initiate connection as 
> SYSTEM:CATALOG is found but client does not have 
> phoenix.schema.isNamespaceMappingEnabled enabled at:java.sql.SQLException: 
> ERROR 726 (43M10):  Inconsistent namespace mapping properties. Cannot 
> initiate connection as SYSTEM:CATALOG is found but client does not have 
> phoenix.schema.isNamespaceMappingEnabled enabled  at 
> org.apache.phoenix.exception.SQLExceptionCode$Factory$1.newException(SQLExceptionCode.java:497)
>   at 
> org.apache.phoenix.exception.SQLExceptionInfo.buildException(SQLExceptionInfo.java:150)
>   at 
> org.apache.phoenix.query.ConnectionQueryServicesImpl.ensureTableCreated(ConnectionQueryServicesImpl.java:1114)
>at 
> org.apache.phoenix.query.ConnectionQueryServicesImpl.createTable(ConnectionQueryServicesImpl.java:1502)
>   at 
> org.apache.phoenix.schema.MetaDataClient.createTableInternal(MetaDataClient.java:2721)
>at 
> org.apache.phoenix.schema.MetaDataClient.createTable(MetaDataClient.java:1114)
>at 
> org.apache.phoenix.compile.CreateTableCompiler$1.execute(CreateTableCompiler.java:198)
>at 
> org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:408)   
> at

Cannot initiate connection as SYSTEM:CATALOG is found but client does not have phoenix.schema.isNamespaceMappingEnabled enabled

2020-08-10 Thread Zhou Zach
Hi all,
    When I run the code, I got a error:
HBASE_CLASSPATH_PREFIX=/opt/cloudera/parcels/PHOENIX/lib/phoenix/lib/*:/etc/hbase/conf
 \ > /opt/cloudera/parcels/CDH/lib/hbase/bin/hbase 
org.apache.phoenix.mapreduce.index.IndexTool \ > --schema ods --data-table 
USER_FLINK8 --index-table user_flink8_ctime_idx --output-path 
hdfs://nameservice1/phoenixSLF4J: Class path contains multiple SLF4J bindings. 
SLF4J: Found binding in 
[jar:file:/opt/cloudera/parcels/CDH-6.3.2-1.cdh6.3.2.p0.1605554/lib/hbase/lib/hbase-hbck2-1.1.0-SNAPSHOT.jar!/org/slf4j/impl/StaticLoggerBinder.class]
 SLF4J: Found binding in 
[jar:file:/opt/cloudera/parcels/CDH-6.3.2-1.cdh6.3.2.p0.1605554/jars/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
 SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an 
explanation. SLF4J: Actual binding is of type 
[org.apache.logging.slf4j.Log4jLoggerFactory] 11:56:08.182 [main] INFO  
org.apache.phoenix.query.ConnectionQueryServicesImpl - An instance of 
ConnectionQueryServices was created. 11:56:08.536 [main] INFO  
org.apache.phoenix.query.ConnectionQueryServicesImpl - HConnection established. 
Stacktrace for informational purposes: hconnection-0x18cebaa5 
java.lang.Thread.getStackTrace(Thread.java:1559) 
org.apache.phoenix.util.LogUtil.getCallerStackTrace(LogUtil.java:55) 
org.apache.phoenix.query.ConnectionQueryServicesImpl.openConnection(ConnectionQueryServicesImpl.java:433)
 
org.apache.phoenix.query.ConnectionQueryServicesImpl.access$400(ConnectionQueryServicesImpl.java:273)
 
org.apache.phoenix.query.ConnectionQueryServicesImpl$12.call(ConnectionQueryServicesImpl.java:2557)
 
org.apache.phoenix.query.ConnectionQueryServicesImpl$12.call(ConnectionQueryServicesImpl.java:2533)
 
org.apache.phoenix.util.PhoenixContextExecutor.call(PhoenixContextExecutor.java:76)
 
org.apache.phoenix.query.ConnectionQueryServicesImpl.init(ConnectionQueryServicesImpl.java:2533)
 
org.apache.phoenix.jdbc.PhoenixDriver.getConnectionQueryServices(PhoenixDriver.java:255)
 
org.apache.phoenix.jdbc.PhoenixEmbeddedDriver.createConnection(PhoenixEmbeddedDriver.java:150)
 org.apache.phoenix.jdbc.PhoenixDriver.connect(PhoenixDriver.java:221) 
java.sql.DriverManager.getConnection(DriverManager.java:664) 
java.sql.DriverManager.getConnection(DriverManager.java:208) 
org.apache.phoenix.mapreduce.util.ConnectionUtil.getConnection(ConnectionUtil.java:113)
 
org.apache.phoenix.mapreduce.util.ConnectionUtil.getInputConnection(ConnectionUtil.java:58)
 
org.apache.phoenix.mapreduce.util.ConnectionUtil.getInputConnection(ConnectionUtil.java:46)
 org.apache.phoenix.mapreduce.index.IndexTool.run(IndexTool.java:536) 
org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:76) 
org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:90) 
org.apache.phoenix.mapreduce.index.IndexTool.main(IndexTool.java:769) 
11:56:09.652 [main] ERROR org.apache.phoenix.mapreduce.index.IndexTool - An 
exception occurred while performing the indexing job: SQLException: ERROR 726 
(43M10):  Inconsistent namespace mapping properties. Cannot initiate connection 
as SYSTEM:CATALOG is found but client does not have 
phoenix.schema.isNamespaceMappingEnabled enabled at: java.sql.SQLException: 
ERROR 726 (43M10):  Inconsistent namespace mapping properties. Cannot initiate 
connection as SYSTEM:CATALOG is found but client does not have 
phoenix.schema.isNamespaceMappingEnabled enabled   at 
org.apache.phoenix.exception.SQLExceptionCode$Factory$1.newException(SQLExceptionCode.java:497)
  at 
org.apache.phoenix.exception.SQLExceptionInfo.buildException(SQLExceptionInfo.java:150)
  at 
org.apache.phoenix.query.ConnectionQueryServicesImpl.ensureTableCreated(ConnectionQueryServicesImpl.java:1114)
   at 
org.apache.phoenix.query.ConnectionQueryServicesImpl.createTable(ConnectionQueryServicesImpl.java:1502)
  at 
org.apache.phoenix.schema.MetaDataClient.createTableInternal(MetaDataClient.java:2721)
   at 
org.apache.phoenix.schema.MetaDataClient.createTable(MetaDataClient.java:1114)  
 at 
org.apache.phoenix.compile.CreateTableCompiler$1.execute(CreateTableCompiler.java:198)
   at 
org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:408)   at 
org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:391)   at 
org.apache.phoenix.call.CallRunner.run(CallRunner.java:53)   at 
org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:390)
  at 
org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:378)
  at 
org.apache.phoenix.jdbc.PhoenixStatement.executeUpdate(PhoenixStatement.java:1806)
   at 
org.apache.phoenix.query.ConnectionQueryServicesImpl$12.call(ConnectionQueryServicesImpl.java:2570)
  at 
org.apache.phoenix.query.ConnectionQueryServicesImpl$12.call(ConnectionQueryServicesImpl.java:2533)
  at 
org.apache.phoenix.util.PhoenixContextExecutor.call(PhoenixContextExecutor.java:76

Re: client does not have phoenix.schema.isNamespaceMappingEnabled

2019-01-30 Thread Ajit Bhingarkar
user-unsubscr...@phoenix.apache.org

On Fri, Nov 30, 2018 at 12:04 AM M. Aaron Bossert 
wrote:

> So, sorry for the super late reply...there is weird lag between the time a
> message is sent or received to this mailing list and when I actually see
> it...But, I have got it working now as follows:
>
>
> HADOOP_CLASSPATH=/usr/hdp/3.0.1.0-187/hbase/lib/hbase-protocol.jar:/etc/hbase/
> 3.0.1. <http://3.0.0.1/>0-187/0/ hadoop jar ...
>
> using this did not work:
>
> HADOOP_CLASSPATH="$(hbase mapredcp)" hadoop jar ...
>
>
> the output of that command separately is this:
>
> [user@server /somedir $] [mabossert@edge-3 lanl_data]$ hbase mapredcp
>
>
> /usr/hdp/3.0.1.0-187/hbase/lib/hbase-shaded-protobuf-2.1.0.jar:/usr/hdp/3.0.1.0-187/zookeeper/zookeeper-3.4.6.3.0.1.0-187.jar:/usr/hdp/3.0.1.0-187/hbase/lib/htrace-core4-4.2.0-incubating.jar:/usr/hdp/3.0.1.0-187/hbase/lib/commons-lang3-3.6.jar:/usr/hdp/3.0.1.0-187/hbase/lib/hbase-server-2.0.0.3.0.1.0-187.jar:/usr/hdp/3.0.1.0-187/hbase/lib/hbase-protocol-shaded-2.0.0.3.0.1.0-187.jar:/usr/hdp/3.0.1.0-187/hbase/lib/hbase-hadoop2-compat-2.0.0.3.0.1.0-187.jar:/usr/hdp/3.0.1.0-187/hbase/lib/hbase-mapreduce-2.0.0.3.0.1.0-187.jar:/usr/hdp/3.0.1.0-187/hbase/lib/hbase-metrics-api-2.0.0.3.0.1.0-187.jar:/usr/hdp/3.0.1.0-187/hbase/lib/protobuf-java-2.5.0.jar:/usr/hdp/3.0.1.0-187/hbase/lib/metrics-core-3.2.1.jar:/usr/hdp/3.0.1.0-187/hbase/lib/jackson-databind-2.9.5.jar:/usr/hdp/3.0.1.0-187/hbase/lib/hbase-client-2.0.0.3.0.1.0-187.jar:/usr/hdp/3.0.1.0-187/hbase/lib/hbase-hadoop-compat-2.0.0.3.0.1.0-187.jar:/usr/hdp/3.0.1.0-187/hbase/lib/hbase-protocol-2.0.0.3.0.1.0-187.jar:/usr/hdp/3.0.1.0-187/hbase/lib/hbase-shaded-netty-2.1.0.jar:/usr/hdp/3.0.1.0-187/hbase/lib/hbase-shaded-miscellaneous-2.1.0.jar:/usr/hdp/3.0.1.0-187/hbase/lib/hbase-metrics-2.0.0.3.0.1.0-187.jar:/usr/hdp/3.0.1.0-187/hbase/lib/hbase-common-2.0.0.3.0.1.0-187.jar:/usr/hdp/3.0.1.0-187/hbase/lib/hbase-zookeeper-2.0.0.3.0.1.0-187.jar:/usr/hdp/3.0.1.0-187/hbase/lib/jackson-annotations-2.9.5.jar:/usr/hdp/3.0.1.0-187/hbase/lib/jackson-core-2.9.5.jar
>
> On Tue, Nov 27, 2018 at 4:26 PM Josh Elser  wrote:
>
>> To add a non-jar file to the classpath of a Java application, you must
>> add the directory containing that file to the classpath.
>>
>> Thus, the following is wrong:
>>
>> HADOOP_CLASSPATH=/usr/hdp/3.0.1.0-187/hbase/lib/hbase-protocol.jar:/etc/hbase/
>> 3.0.1.0-187/0/hbase-site.xml
>>
>> And should be:
>>
>> HADOOP_CLASSPATH=/usr/hdp/3.0.1.0-187/hbase/lib/hbase-protocol.jar:/etc/hbase/
>> 3.0.1.0-187/0/
>>
>> Most times, including the output of `hbase mapredcp` is sufficient ala
>>
>> HADOOP_CLASSPATH="$(hbase mapredcp)" hadoop jar ...
>>
>> On 11/27/18 10:48 AM, M. Aaron Bossert wrote:
>> > Folks,
>> >
>> > I have, I believe, followed all the directions for turning on namespace
>> > mapping as well as extra steps to (added classpath) required to use the
>> > mapreduce bulk load utility, but am still running into this error...I
>> am
>> > running a Hortonworks cluster with both HDP v 3.0.1 and HDF
>> components.
>> > Here is what I have tried:
>> >
>> >   * Checked that the proper hbase-site.xml (in my case:
>> > /etc/hbase/3.0.1.0-187/0/hbase-site.xml) file is being referenced
>> > when launching the mapreduce utility:
>> >
>> >
>> >  ...
>> >
>> >
>> > 
>> >
>> > phoenix.schema.isNamespaceMappingEnabled
>> >
>> > true
>> >
>> > 
>> >
>> > 
>> >
>> > phoenix.schema.mapSystemTablesToNamespace
>> >
>> > true
>> >
>> > 
>> >
>> >
>> >  ...
>> >
>> >   * added the appropriate classpath additions to the hadoop jar command
>> > (zookeeper quorum hostnames changed to remove my corporate network
>> > info as well as data directory):
>> >
>> >
>> HADOOP_CLASSPATH=/usr/hdp/3.0.1.0-187/hbase/lib/hbase-protocol.jar:/etc/hbase/
>> 3.0.1.0-187/0/hbase-site.xml
>> > hadoop jar
>> > /usr/hdp/3.0.1.0-187/phoenix/phoenix-5.0.0.3.0.1.0-187-client.jar
>> > org.apache.phoenix.mapreduce.CsvBulkLoadTool --table MYTABLE --input
>> > /ingest/MYCSV -z zk1,zk2,zk3 -g
>> >
>> >
>> > ...
>> >
>> >
>> > 18/11/27 15:31:48 INFO zookeeper.ReadOnlyZKClient: Close zookeeper
>> > connection 0x1d58d65f to master-1.punch.datareservoir.net:2181
>> > <http://master-1.punch.datareservo

Re: client does not have phoenix.schema.isNamespaceMappingEnabled

2018-11-30 Thread M. Aaron Bossert
>  > phoenix.schema.isNamespaceMappingEnabled
> >  >
> >  > true
> >  >
> >  > 
> >  >
> >  > 
> >  >
> >  > phoenix.schema.mapSystemTablesToNamespace
> >  >
> >  > true
> >  >
> >  > 
> >  >
> >  >
> >  >  ...
> >  >
> >  >   * added the appropriate classpath additions to the hadoop jar
> > command
> >  > (zookeeper quorum hostnames changed to remove my corporate
> > network
> >  > info as well as data directory):
> >  >
> >  >
> >
>  
> HADOOP_CLASSPATH=/usr/hdp/3.0.1.0-187/hbase/lib/hbase-protocol.jar:/etc/hbase/
> 3.0.1.
> > <http://3.0.1.>0-187/0/hbase-site.xml
> >  > hadoop jar
> >  > /usr/hdp/3.0.1.0-187/phoenix/phoenix-5.0.0.3.0.1.0-187-client.jar
> >  > org.apache.phoenix.mapreduce.CsvBulkLoadTool --table MYTABLE
> --input
> >  > /ingest/MYCSV -z zk1,zk2,zk3 -g
> >  >
> >  >
> >  > ...
> >  >
> >  >
> >  > 18/11/27 15:31:48 INFO zookeeper.ReadOnlyZKClient: Close zookeeper
> >      > connection 0x1d58d65f to master-1.punch.datareservoir.net:2181
> > <http://master-1.punch.datareservoir.net:2181>
> >  >
> > <http://master-1.punch.datareservoir.net:2181>,
> master-2.punch.datareservoir.net:2181
> > <http://master-2.punch.datareservoir.net:2181>
> >  >
> > <http://master-2.punch.datareservoir.net:2181>,
> master-3.punch.datareservoir.net:2181
> > <http://master-3.punch.datareservoir.net:2181>
> >  > <http://master-3.punch.datareservoir.net:2181>
> >  >
> >  > 18/11/27 15:31:48 INFO log.QueryLoggerDisruptor: Shutting down
> >  > QueryLoggerDisruptor..
> >  >
> >  > Exception in thread "main" java.sql.SQLException: ERROR 726
> >  > (43M10):Inconsistent namespace mapping properties. Cannot initiate
> >  > connection as SYSTEM:CATALOG is found but client does not have
> >  > phoenix.schema.isNamespaceMappingEnabled enabled
> >  >
> >  > at
> >  >
> >
>  
> org.apache.phoenix.exception.SQLExceptionCode$Factory$1.newException(SQLExceptionCode.java:494)
> >  >
> >  > at
> >  >
> >
>  
> org.apache.phoenix.exception.SQLExceptionInfo.buildException(SQLExceptionInfo.java:150)
> >  >
> >  > at
> >  >
> >
>  
> org.apache.phoenix.query.ConnectionQueryServicesImpl.ensureTableCreated(ConnectionQueryServicesImpl.java:1113)
> >  >
> >  > at
> >  >
> >
>  
> org.apache.phoenix.query.ConnectionQueryServicesImpl.createTable(ConnectionQueryServicesImpl.java:1501)
> >  >
> >  > at
> >  >
> >
>  
> org.apache.phoenix.schema.MetaDataClient.createTableInternal(MetaDataClient.java:2740)
> >  >
> >  > at
> >  >
> >
>  
> org.apache.phoenix.schema.MetaDataClient.createTable(MetaDataClient.java:1114)
> >  >
> >  > at
> >  >
> >
>  
> org.apache.phoenix.compile.CreateTableCompiler$1.execute(CreateTableCompiler.java:192)
> >  >
> >  > at
> >  >
> >
>  org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:408)
> >  >
> >  > at
> >  >
> >
>  org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:391)
> >  >
> >  > at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53)
> >  >
> >  > at
> >  >
> >
>  
> org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:390)
> >  >
> >  > at
> >  >
> >
>  
> org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:378)
> >  >
> >  > at
> >  >
> >
>  
> org.apache.phoenix.jdbc.PhoenixStatement.executeUpdate(PhoenixStatement.java:1806)
> >  >
> >  > at
> >  >
> >
>  
> org.apache.phoenix.query.ConnectionQueryServicesImpl$12.call(ConnectionQueryServicesImpl.java:2569)
> >  >
> >  > at
> >  >
> >
>  
> org.apache.phoenix.query.ConnectionQueryServicesImp

Re: client does not have phoenix.schema.isNamespaceMappingEnabled

2018-11-29 Thread Josh Elser
OnlyZKClient: Close zookeeper
 > connection 0x1d58d65f to master-1.punch.datareservoir.net:2181
<http://master-1.punch.datareservoir.net:2181>
 >

<http://master-1.punch.datareservoir.net:2181>,master-2.punch.datareservoir.net:2181
<http://master-2.punch.datareservoir.net:2181>
 >

<http://master-2.punch.datareservoir.net:2181>,master-3.punch.datareservoir.net:2181
<http://master-3.punch.datareservoir.net:2181>
 > <http://master-3.punch.datareservoir.net:2181>
 >
 > 18/11/27 15:31:48 INFO log.QueryLoggerDisruptor: Shutting down
 > QueryLoggerDisruptor..
 >
 > Exception in thread "main" java.sql.SQLException: ERROR 726
 > (43M10):Inconsistent namespace mapping properties. Cannot initiate
 > connection as SYSTEM:CATALOG is found but client does not have
 > phoenix.schema.isNamespaceMappingEnabled enabled
 >
 > at
 >

org.apache.phoenix.exception.SQLExceptionCode$Factory$1.newException(SQLExceptionCode.java:494)
 >
 > at
 >

org.apache.phoenix.exception.SQLExceptionInfo.buildException(SQLExceptionInfo.java:150)
 >
 > at
 >

org.apache.phoenix.query.ConnectionQueryServicesImpl.ensureTableCreated(ConnectionQueryServicesImpl.java:1113)
 >
 > at
 >

org.apache.phoenix.query.ConnectionQueryServicesImpl.createTable(ConnectionQueryServicesImpl.java:1501)
 >
 > at
 >

org.apache.phoenix.schema.MetaDataClient.createTableInternal(MetaDataClient.java:2740)
 >
 > at
 >

org.apache.phoenix.schema.MetaDataClient.createTable(MetaDataClient.java:1114)
 >
 > at
 >

org.apache.phoenix.compile.CreateTableCompiler$1.execute(CreateTableCompiler.java:192)
 >
 > at
 >
org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:408)
 >
 > at
 >
org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:391)
 >
 > at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53)
 >
 > at
 >

org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:390)
 >
 > at
 >

org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:378)
 >
 > at
 >

org.apache.phoenix.jdbc.PhoenixStatement.executeUpdate(PhoenixStatement.java:1806)
 >
 > at
 >

org.apache.phoenix.query.ConnectionQueryServicesImpl$12.call(ConnectionQueryServicesImpl.java:2569)
 >
 > at
 >

org.apache.phoenix.query.ConnectionQueryServicesImpl$12.call(ConnectionQueryServicesImpl.java:2532)
 >
 > at
 >

org.apache.phoenix.util.PhoenixContextExecutor.call(PhoenixContextExecutor.java:76)
 >
 > at
 >

org.apache.phoenix.query.ConnectionQueryServicesImpl.init(ConnectionQueryServicesImpl.java:2532)
 >
 > at
 >

org.apache.phoenix.jdbc.PhoenixDriver.getConnectionQueryServices(PhoenixDriver.java:255)
 >
 > at
 >

org.apache.phoenix.jdbc.PhoenixEmbeddedDriver.createConnection(PhoenixEmbeddedDriver.java:150)
 >
 > at
org.apache.phoenix.jdbc.PhoenixDriver.connect(PhoenixDriver.java:221)
 >
 > at java.sql.DriverManager.getConnection(DriverManager.java:664)
 >
 > at java.sql.DriverManager.getConnection(DriverManager.java:208)
 >
 > at
org.apache.phoenix.util.QueryUtil.getConnection(QueryUtil.java:400)
 >
 > at
org.apache.phoenix.util.QueryUtil.getConnection(QueryUtil.java:392)
 >
 > at
 >

org.apache.phoenix.mapreduce.AbstractBulkLoadTool.loadData(AbstractBulkLoadTool.java:206)
 >
 > at
 >

org.apache.phoenix.mapreduce.AbstractBulkLoadTool.run(AbstractBulkLoadTool.java:180)
 >
 > at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:76)
 >
 > at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:90)
 >
 > at
 >
org.apache.phoenix.mapreduce.CsvBulkLoadTool.main(CsvBulkLoadTool.java:109)
 >
 > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 >
 > at
 >

sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
 >
 > at
 >

sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 >
 > at java.lang.reflect.Method.invoke(Method.java:498)
 >
 > at org.apache.hadoop.util.RunJar.run(RunJar.java:318)
 >
 > at org.apache.hadoop.util.RunJar.main(RunJar.java:232)
 >
 > 18/11/27 15:31:48 INFO zookeeper.ZooKeeper: Session:
0x3672eebffa800c8
 > closed
 >
 > 18/1

Re: client does not have phoenix.schema.isNamespaceMappingEnabled

2018-11-29 Thread M. Aaron Bossert
So, sorry for the super late reply...there is weird lag between the time a
message is sent or received to this mailing list and when I actually see
it...But, I have got it working now as follows:

HADOOP_CLASSPATH=/usr/hdp/3.0.1.0-187/hbase/lib/hbase-protocol.jar:/etc/hbase/
3.0.1. <http://3.0.0.1/>0-187/0/ hadoop jar ...

using this did not work:

HADOOP_CLASSPATH="$(hbase mapredcp)" hadoop jar ...


the output of that command separately is this:

[user@server /somedir $] [mabossert@edge-3 lanl_data]$ hbase mapredcp

/usr/hdp/3.0.1.0-187/hbase/lib/hbase-shaded-protobuf-2.1.0.jar:/usr/hdp/3.0.1.0-187/zookeeper/zookeeper-3.4.6.3.0.1.0-187.jar:/usr/hdp/3.0.1.0-187/hbase/lib/htrace-core4-4.2.0-incubating.jar:/usr/hdp/3.0.1.0-187/hbase/lib/commons-lang3-3.6.jar:/usr/hdp/3.0.1.0-187/hbase/lib/hbase-server-2.0.0.3.0.1.0-187.jar:/usr/hdp/3.0.1.0-187/hbase/lib/hbase-protocol-shaded-2.0.0.3.0.1.0-187.jar:/usr/hdp/3.0.1.0-187/hbase/lib/hbase-hadoop2-compat-2.0.0.3.0.1.0-187.jar:/usr/hdp/3.0.1.0-187/hbase/lib/hbase-mapreduce-2.0.0.3.0.1.0-187.jar:/usr/hdp/3.0.1.0-187/hbase/lib/hbase-metrics-api-2.0.0.3.0.1.0-187.jar:/usr/hdp/3.0.1.0-187/hbase/lib/protobuf-java-2.5.0.jar:/usr/hdp/3.0.1.0-187/hbase/lib/metrics-core-3.2.1.jar:/usr/hdp/3.0.1.0-187/hbase/lib/jackson-databind-2.9.5.jar:/usr/hdp/3.0.1.0-187/hbase/lib/hbase-client-2.0.0.3.0.1.0-187.jar:/usr/hdp/3.0.1.0-187/hbase/lib/hbase-hadoop-compat-2.0.0.3.0.1.0-187.jar:/usr/hdp/3.0.1.0-187/hbase/lib/hbase-protocol-2.0.0.3.0.1.0-187.jar:/usr/hdp/3.0.1.0-187/hbase/lib/hbase-shaded-netty-2.1.0.jar:/usr/hdp/3.0.1.0-187/hbase/lib/hbase-shaded-miscellaneous-2.1.0.jar:/usr/hdp/3.0.1.0-187/hbase/lib/hbase-metrics-2.0.0.3.0.1.0-187.jar:/usr/hdp/3.0.1.0-187/hbase/lib/hbase-common-2.0.0.3.0.1.0-187.jar:/usr/hdp/3.0.1.0-187/hbase/lib/hbase-zookeeper-2.0.0.3.0.1.0-187.jar:/usr/hdp/3.0.1.0-187/hbase/lib/jackson-annotations-2.9.5.jar:/usr/hdp/3.0.1.0-187/hbase/lib/jackson-core-2.9.5.jar

On Tue, Nov 27, 2018 at 4:26 PM Josh Elser  wrote:

> To add a non-jar file to the classpath of a Java application, you must
> add the directory containing that file to the classpath.
>
> Thus, the following is wrong:
>
> HADOOP_CLASSPATH=/usr/hdp/3.0.1.0-187/hbase/lib/hbase-protocol.jar:/etc/hbase/
> 3.0.1.0-187/0/hbase-site.xml
>
> And should be:
>
> HADOOP_CLASSPATH=/usr/hdp/3.0.1.0-187/hbase/lib/hbase-protocol.jar:/etc/hbase/
> 3.0.1.0-187/0/
>
> Most times, including the output of `hbase mapredcp` is sufficient ala
>
> HADOOP_CLASSPATH="$(hbase mapredcp)" hadoop jar ...
>
> On 11/27/18 10:48 AM, M. Aaron Bossert wrote:
> > Folks,
> >
> > I have, I believe, followed all the directions for turning on namespace
> > mapping as well as extra steps to (added classpath) required to use the
> > mapreduce bulk load utility, but am still running into this error...I am
> > running a Hortonworks cluster with both HDP v 3.0.1 and HDF components.
> > Here is what I have tried:
> >
> >   * Checked that the proper hbase-site.xml (in my case:
> > /etc/hbase/3.0.1.0-187/0/hbase-site.xml) file is being referenced
> > when launching the mapreduce utility:
> >
> >
> >  ...
> >
> >
> > 
> >
> > phoenix.schema.isNamespaceMappingEnabled
> >
> > true
> >
> > 
> >
> > 
> >
> > phoenix.schema.mapSystemTablesToNamespace
> >
> > true
> >
> > 
> >
> >
> >  ...
> >
> >   * added the appropriate classpath additions to the hadoop jar command
> > (zookeeper quorum hostnames changed to remove my corporate network
> > info as well as data directory):
> >
> >
> HADOOP_CLASSPATH=/usr/hdp/3.0.1.0-187/hbase/lib/hbase-protocol.jar:/etc/hbase/
> 3.0.1.0-187/0/hbase-site.xml
> > hadoop jar
> > /usr/hdp/3.0.1.0-187/phoenix/phoenix-5.0.0.3.0.1.0-187-client.jar
> > org.apache.phoenix.mapreduce.CsvBulkLoadTool --table MYTABLE --input
> > /ingest/MYCSV -z zk1,zk2,zk3 -g
> >
> >
> > ...
> >
> >
> > 18/11/27 15:31:48 INFO zookeeper.ReadOnlyZKClient: Close zookeeper
> > connection 0x1d58d65f to master-1.punch.datareservoir.net:2181
> > <http://master-1.punch.datareservoir.net:2181>,
> master-2.punch.datareservoir.net:2181
> > <http://master-2.punch.datareservoir.net:2181>,
> master-3.punch.datareservoir.net:2181
> > <http://master-3.punch.datareservoir.net:2181>
> >
> > 18/11/27 15:31:48 INFO log.QueryLoggerDisruptor: Shutting down
> > QueryLoggerDisruptor..
> >
> > Exception in thread "main" java.sql.SQLException: ERROR 726
> > (43M10):Inconsistent namespace mapping properties. Cannot initi

Re: client does not have phoenix.schema.isNamespaceMappingEnabled

2018-11-27 Thread Josh Elser
To add a non-jar file to the classpath of a Java application, you must 
add the directory containing that file to the classpath.


Thus, the following is wrong: 
HADOOP_CLASSPATH=/usr/hdp/3.0.1.0-187/hbase/lib/hbase-protocol.jar:/etc/hbase/3.0.1.0-187/0/hbase-site.xml


And should be: 
HADOOP_CLASSPATH=/usr/hdp/3.0.1.0-187/hbase/lib/hbase-protocol.jar:/etc/hbase/3.0.1.0-187/0/


Most times, including the output of `hbase mapredcp` is sufficient ala

HADOOP_CLASSPATH="$(hbase mapredcp)" hadoop jar ...

On 11/27/18 10:48 AM, M. Aaron Bossert wrote:

Folks,

I have, I believe, followed all the directions for turning on namespace 
mapping as well as extra steps to (added classpath) required to use the 
mapreduce bulk load utility, but am still running into this error...I am 
running a Hortonworks cluster with both HDP v 3.0.1 and HDF components.  
Here is what I have tried:


  * Checked that the proper hbase-site.xml (in my case:
/etc/hbase/3.0.1.0-187/0/hbase-site.xml) file is being referenced
when launching the mapreduce utility:


     ...




phoenix.schema.isNamespaceMappingEnabled

true





phoenix.schema.mapSystemTablesToNamespace

true




     ...

  * added the appropriate classpath additions to the hadoop jar command
(zookeeper quorum hostnames changed to remove my corporate network
info as well as data directory):

HADOOP_CLASSPATH=/usr/hdp/3.0.1.0-187/hbase/lib/hbase-protocol.jar:/etc/hbase/3.0.1.0-187/0/hbase-site.xml 
hadoop jar 
/usr/hdp/3.0.1.0-187/phoenix/phoenix-5.0.0.3.0.1.0-187-client.jar 
org.apache.phoenix.mapreduce.CsvBulkLoadTool --table MYTABLE --input 
/ingest/MYCSV -z zk1,zk2,zk3 -g



...


18/11/27 15:31:48 INFO zookeeper.ReadOnlyZKClient: Close zookeeper 
connection 0x1d58d65f to master-1.punch.datareservoir.net:2181 
<http://master-1.punch.datareservoir.net:2181>,master-2.punch.datareservoir.net:2181 
<http://master-2.punch.datareservoir.net:2181>,master-3.punch.datareservoir.net:2181 
<http://master-3.punch.datareservoir.net:2181>


18/11/27 15:31:48 INFO log.QueryLoggerDisruptor: Shutting down 
QueryLoggerDisruptor..


Exception in thread "main" java.sql.SQLException: ERROR 726 
(43M10):Inconsistent namespace mapping properties. Cannot initiate 
connection as SYSTEM:CATALOG is found but client does not have 
phoenix.schema.isNamespaceMappingEnabled enabled


at 
org.apache.phoenix.exception.SQLExceptionCode$Factory$1.newException(SQLExceptionCode.java:494)


at 
org.apache.phoenix.exception.SQLExceptionInfo.buildException(SQLExceptionInfo.java:150)


at 
org.apache.phoenix.query.ConnectionQueryServicesImpl.ensureTableCreated(ConnectionQueryServicesImpl.java:1113)


at 
org.apache.phoenix.query.ConnectionQueryServicesImpl.createTable(ConnectionQueryServicesImpl.java:1501)


at 
org.apache.phoenix.schema.MetaDataClient.createTableInternal(MetaDataClient.java:2740)


at 
org.apache.phoenix.schema.MetaDataClient.createTable(MetaDataClient.java:1114)


at 
org.apache.phoenix.compile.CreateTableCompiler$1.execute(CreateTableCompiler.java:192)


at 
org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:408)


at 
org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:391)


at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53)

at 
org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:390)


at 
org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:378)


at 
org.apache.phoenix.jdbc.PhoenixStatement.executeUpdate(PhoenixStatement.java:1806)


at 
org.apache.phoenix.query.ConnectionQueryServicesImpl$12.call(ConnectionQueryServicesImpl.java:2569)


at 
org.apache.phoenix.query.ConnectionQueryServicesImpl$12.call(ConnectionQueryServicesImpl.java:2532)


at 
org.apache.phoenix.util.PhoenixContextExecutor.call(PhoenixContextExecutor.java:76)


at 
org.apache.phoenix.query.ConnectionQueryServicesImpl.init(ConnectionQueryServicesImpl.java:2532)


at 
org.apache.phoenix.jdbc.PhoenixDriver.getConnectionQueryServices(PhoenixDriver.java:255)


at 
org.apache.phoenix.jdbc.PhoenixEmbeddedDriver.createConnection(PhoenixEmbeddedDriver.java:150)


at org.apache.phoenix.jdbc.PhoenixDriver.connect(PhoenixDriver.java:221)

at java.sql.DriverManager.getConnection(DriverManager.java:664)

at java.sql.DriverManager.getConnection(DriverManager.java:208)

at org.apache.phoenix.util.QueryUtil.getConnection(QueryUtil.java:400)

at org.apache.phoenix.util.QueryUtil.getConnection(QueryUtil.java:392)

at 
org.apache.phoenix.mapreduce.AbstractBulkLoadTool.loadData(AbstractBulkLoadTool.java:206)


at 
org.apache.phoenix.mapreduce.AbstractBulkLoadTool.run(AbstractBulkLoadTool.java:180)


at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:76)

at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:90)

at 
org.apache.phoenix.mapreduce.CsvBulkLoadTool.main(CsvBulkLoadTool.java:109)


at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at 
sun.r

client does not have phoenix.schema.isNamespaceMappingEnabled

2018-11-27 Thread M. Aaron Bossert
Folks,

I have, I believe, followed all the directions for turning on namespace
mapping as well as extra steps to (added classpath) required to use the
mapreduce bulk load utility, but am still running into this error...I am
running a Hortonworks cluster with both HDP v 3.0.1 and HDF components.
Here is what I have tried:


   - Checked that the proper hbase-site.xml (in my case:
   /etc/hbase/3.0.1.0-187/0/hbase-site.xml) file is being referenced when
   launching the mapreduce utility:


...




  phoenix.schema.isNamespaceMappingEnabled

  true







  phoenix.schema.mapSystemTablesToNamespace

  true




...

   - added the appropriate classpath additions to the hadoop jar command
   (zookeeper quorum hostnames changed to remove my corporate network info as
   well as data directory):

HADOOP_CLASSPATH=/usr/hdp/3.0.1.0-187/hbase/lib/hbase-protocol.jar:/etc/hbase/3.0.1.0-187/0/hbase-site.xml
hadoop jar
/usr/hdp/3.0.1.0-187/phoenix/phoenix-5.0.0.3.0.1.0-187-client.jar
org.apache.phoenix.mapreduce.CsvBulkLoadTool --table MYTABLE --input
/ingest/MYCSV -z zk1,zk2,zk3 -g


...


18/11/27 15:31:48 INFO zookeeper.ReadOnlyZKClient: Close zookeeper
connection 0x1d58d65f to master-1.punch.datareservoir.net:2181,
master-2.punch.datareservoir.net:2181,master-3.punch.datareservoir.net:2181

18/11/27 15:31:48 INFO log.QueryLoggerDisruptor: Shutting down
QueryLoggerDisruptor..

Exception in thread "main" java.sql.SQLException: ERROR 726 (43M10):
Inconsistent
namespace mapping properties. Cannot initiate connection as SYSTEM:CATALOG
is found but client does not have phoenix.schema.isNamespaceMappingEnabled
enabled

at
org.apache.phoenix.exception.SQLExceptionCode$Factory$1.newException(SQLExceptionCode.java:494)

at
org.apache.phoenix.exception.SQLExceptionInfo.buildException(SQLExceptionInfo.java:150)

at
org.apache.phoenix.query.ConnectionQueryServicesImpl.ensureTableCreated(ConnectionQueryServicesImpl.java:1113)

at
org.apache.phoenix.query.ConnectionQueryServicesImpl.createTable(ConnectionQueryServicesImpl.java:1501)

at
org.apache.phoenix.schema.MetaDataClient.createTableInternal(MetaDataClient.java:2740)

at
org.apache.phoenix.schema.MetaDataClient.createTable(MetaDataClient.java:1114)

at
org.apache.phoenix.compile.CreateTableCompiler$1.execute(CreateTableCompiler.java:192)

at
org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:408)

at
org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:391)

at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53)

at
org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:390)

at
org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:378)

at
org.apache.phoenix.jdbc.PhoenixStatement.executeUpdate(PhoenixStatement.java:1806)

at
org.apache.phoenix.query.ConnectionQueryServicesImpl$12.call(ConnectionQueryServicesImpl.java:2569)

at
org.apache.phoenix.query.ConnectionQueryServicesImpl$12.call(ConnectionQueryServicesImpl.java:2532)

at
org.apache.phoenix.util.PhoenixContextExecutor.call(PhoenixContextExecutor.java:76)

at
org.apache.phoenix.query.ConnectionQueryServicesImpl.init(ConnectionQueryServicesImpl.java:2532)

at
org.apache.phoenix.jdbc.PhoenixDriver.getConnectionQueryServices(PhoenixDriver.java:255)

at
org.apache.phoenix.jdbc.PhoenixEmbeddedDriver.createConnection(PhoenixEmbeddedDriver.java:150)

at org.apache.phoenix.jdbc.PhoenixDriver.connect(PhoenixDriver.java:221)

at java.sql.DriverManager.getConnection(DriverManager.java:664)

at java.sql.DriverManager.getConnection(DriverManager.java:208)

at org.apache.phoenix.util.QueryUtil.getConnection(QueryUtil.java:400)

at org.apache.phoenix.util.QueryUtil.getConnection(QueryUtil.java:392)

at
org.apache.phoenix.mapreduce.AbstractBulkLoadTool.loadData(AbstractBulkLoadTool.java:206)

at
org.apache.phoenix.mapreduce.AbstractBulkLoadTool.run(AbstractBulkLoadTool.java:180)

at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:76)

at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:90)

at
org.apache.phoenix.mapreduce.CsvBulkLoadTool.main(CsvBulkLoadTool.java:109)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:498)

at org.apache.hadoop.util.RunJar.run(RunJar.java:318)

at org.apache.hadoop.util.RunJar.main(RunJar.java:232)

18/11/27 15:31:48 INFO zookeeper.ZooKeeper: Session: 0x3672eebffa800c8
closed

18/11/27 15:31:48 INFO zookeeper.ClientCnxn: EventThread shut down

   - Also tried the other recommended option:

HADOOP_CLASSPATH=$(hbase
mapredcp):/etc/hbase/3.0.1.0-187/0/hbase-site.xml hadoop
jar /usr/hdp/3.0.1.0-187/phoenix/phoenix-5.0.0.3.0.1.0-187-client.jar
org.apache.phoenix.mapreduce.CsvBulkLoadTool --table MYTABLE --input
/ingest/MYCSV