Member since
06-16-2016
6
Posts
0
Kudos Received
0
Solutions
01-11-2017
02:08 PM
Josh, I'm looking for a means to direct message you. In our HDP 2.5 deployment we have enabled Phoenix Query Server, and (through following some of your other forum responses - https://community.hortonworks.com/questions/47138/phoenix-query-server-connection-url-example.html) confirmed that we can connect using Kerberos secured thin client... however, the PQS appears to be caching that connection and re-using it when connecting with a different principal and keytab. If we bounce the PQS via ambari then the subsequent first secured login seemingly becomes the cached security. Chris.
... View more
11-07-2016
11:39 AM
Rajesh, Thank you, I didn't see that (it might help if that were in the Views documentation page). This worked, use "durham";
create table "TEST" (PK VARCHAR PRIMARY KEY, "b"."message" VARCHAR);
SELECT * FROM "TEST";
+-----+----------+
| PK | message |
+-----+----------+
| 1 | Hello |
| 2 | World |
+-----+----------+
2 rows selected (0.126 seconds)
using this approach (i.e. CREATE TABLE) I actually don't require a View, although it has a different issue: CREATE VIEW "TEST" ( pk VARCHAR PRIMARY KEY ,"b"."message" VARCHAR ) AS SELECT * FROM "TEST";
Error: ERROR 1036 (42J04): Cannot modify the primary key of a VIEW if last PK column of parent is variable length. columnName=durham.TEST.PK (state=42J04,code=1036)
java.sql.SQLException: ERROR 1036 (42J04): Cannot modify the primary key of a VIEW if last PK column of parent is variable length. columnName=durham.TEST.PK
are VARCHAR PRIMARY KEY's not supported on Views? Chris.
... View more
11-07-2016
09:50 AM
Dear Experts,
We have HDP 2.5 (Phoenix 4.7.0.2.5.0.0-1245) - does it support View creation on an HBase table created in a namespace using HBase shell (i.e. not created through Phoenix Grammar)?
I have run knit,
kinit -k -t /etc/security/keytabs/hbase.headless.keytab hbase-cluster1
In Hbase shell,
create 'durham:TEST', 'b'
put 'durham:TEST', '1', 'b:message', 'Hello'
put 'durham:TEST', '2', 'b:message', 'World'
hbase(main):026:0> scan 'durham:TEST'
ROW COLUMN+CELL
1 column=b:message, timestamp=1478511785906, value=Hello
2 column=b:message, timestamp=1478511794551, value=World
then sqlline,
0: jdbc:phoenix:localhost:2181/hbase-secure> select DISTINCT TABLE_SCHEM from SYSTEM.CATALOG;
+--------------+
| TABLE_SCHEM |
+--------------+
| DURHAM |
| SYSTEM |
+--------------+
create view gives ,
use "durham";
CREATE VIEW "TEST" (
pk VARCHAR PRIMARY KEY
,"b"."message" VARCHAR
)
AS SELECT * FROM "TEST";
create view error , Error: ERROR 505 (42000): Table is read only. (state=42000,code=505)
org.apache.phoenix.schema.ReadOnlyTableException: ERROR 505 (42000): Table is read only.
at org.apache.phoenix.query.ConnectionQueryServicesImpl.ensureTableCreated(ConnectionQueryServicesImpl.java:1032)
at org.apache.phoenix.query.ConnectionQueryServicesImpl.createTable(ConnectionQueryServicesImpl.java:1415)
at org.apache.phoenix.schema.MetaDataClient.createTableInternal(MetaDataClient.java:2180)
at org.apache.phoenix.schema.MetaDataClient.createTable(MetaDataClient.java:865)
at org.apache.phoenix.compile.CreateTableCompiler$2.execute(CreateTableCompiler.java:194)
at org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:343)
at org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:331)
at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53)
at org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:329)
at org.apache.phoenix.jdbc.PhoenixStatement.execute(PhoenixStatement.java:1440)
at sqlline.Commands.execute(Commands.java:822)
at sqlline.Commands.sql(Commands.java:732)
at sqlline.SqlLine.dispatch(SqlLine.java:808)
at sqlline.SqlLine.begin(SqlLine.java:681)
at sqlline.SqlLine.start(SqlLine.java:398)
at sqlline.SqlLine.main(SqlLine.java:292)
... View more
Labels:
- Labels:
-
Apache Phoenix
11-03-2016
07:03 PM
thanks will do. BTW - last piggy-back! - I checked the log (/usr/hadoop/log/hbase/phoenix-hbase-server.log) its giving this, 2016-11-03 15:00:54,679 WARN org.apache.phoenix.shaded.org.eclipse.jetty.security.SpnegoLoginService:
GSSException: Failure unspecified at GSS-API level (Mechanism level: Checksum failed)
at sun.security.jgss.krb5.Krb5Context.acceptSecContext(Krb5Context.java:856)
at sun.security.jgss.GSSContextImpl.acceptSecContext(GSSContextImpl.java:342)
at sun.security.jgss.GSSContextImpl.acceptSecContext(GSSContextImpl.java:285)
at sun.security.jgss.spnego.SpNegoContext.GSS_acceptSecContext(SpNegoContext.java:906)
at sun.security.jgss.spnego.SpNegoContext.acceptSecContext(SpNegoContext.java:556)
at sun.security.jgss.GSSContextImpl.acceptSecContext(GSSContextImpl.java:342)
at sun.security.jgss.GSSContextImpl.acceptSecContext(GSSContextImpl.java:285)
... View more
11-03-2016
10:03 AM
PHOENIX-2792 says fixed in 4.8.0, HDP 2.5 has 4.7.0.2.5.0.0-1245, are Hortonworks confident this feature made it into the HDP 2.5 distribution?
... View more
11-03-2016
09:46 AM
Hi Josh, I'm using HDP 2.5 (upgraded from 2.4.2) and have attempted to follow the above instructions but it's not working from Java client or on the master (./sqline.py works but not "thin"). I've run kinit, kinit -k -t /etc/security/keytabs/hbase.headless.keytab hbase-cluster1 Then I run (obfuscated), ./sqlline-thin.py http://b3e073.*****.com:8765;authentication=SPNEGO
I also tried, ./sqlline-thin.py http://localhost:8765;authentication=SPNEGO The (obfuscated) output is, SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/usr/hdp/2.5.0.0-1245/phoenix/phoenix-4.7.0.2.5.0.0-1245-thin-client.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/hdp/2.5.0.0-1245/hadoop/lib/slf4j-log4j12-1.7.10.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.slf4j.impl.Log4jLoggerFactory]
16/11/03 05:37:26 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
Setting property: [incremental, false]
Setting property: [isolation, TRANSACTION_READ_COMMITTED]
issuing: !connect jdbc:phoenix:thin:url=http://b3e073.*****.com:8765;serialization=PROTOBUF;authentication=SPNEGO none none org.apache.phoenix.queryserver.client.Driver
Connecting to jdbc:phoenix:thin:url=http://b3e073.*****.com:8765;serialization=PROTOBUF;authentication=SPNEGO
java.lang.RuntimeException: Failed to execute HTTP Request, got HTTP/404
at org.apache.calcite.avatica.remote.AvaticaCommonsHttpClientSpnegoImpl.send(AvaticaCommonsHttpClientSpnegoImpl.java:148)
at org.apache.calcite.avatica.remote.RemoteProtobufService._apply(RemoteProtobufService.java:44)
at org.apache.calcite.avatica.remote.ProtobufService.apply(ProtobufService.java:81)
at org.apache.calcite.avatica.remote.Driver.connect(Driver.java:175)
at sqlline.DatabaseConnection.connect(DatabaseConnection.java:157)
at sqlline.DatabaseConnection.getConnection(DatabaseConnection.java:203)
at sqlline.Commands.connect(Commands.java:1064)
at sqlline.Commands.connect(Commands.java:996)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at sqlline.ReflectiveCommandHandler.execute(ReflectiveCommandHandler.java:36)
at sqlline.SqlLine.dispatch(SqlLine.java:804)
at sqlline.SqlLine.initArgs(SqlLine.java:588)
at sqlline.SqlLine.begin(SqlLine.java:656)
at sqlline.SqlLine.start(SqlLine.java:398)
at sqlline.SqlLine.main(SqlLine.java:292)
at org.apache.phoenix.queryserver.client.SqllineWrapper$1.run(SqllineWrapper.java:78)
at org.apache.phoenix.queryserver.client.SqllineWrapper$1.run(SqllineWrapper.java:75)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:415)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1724)
at org.apache.phoenix.queryserver.client.SqllineWrapper.main(SqllineWrapper.java:75)
sqlline version 1.1.8 any idea where I'm going wrong? thanks, Chris.
... View more