Phoenix-4.14-cdh5.14.2 and hbase-1.2.0-cdh5.14.2 integration testing

Official website to download http://phoenix.apache.org/download.html

1, upload unzip
   $ tar zxf the Apache-Phoenix-4.14.0-cdh5.14.2-bin.tar.gz
   $ mv the Apache-Phoenix-4.14.0-bin-cdh5.14.2 Phoenix-4.14.0-cdh5.14.2 (not modification)
  2, the phoenix-4.14.0-cdh5.14.2-client.jar installation directory under the phoenix copied to the hbase lib directory
   $ cp phoenix-4.14.0-cdh5.14.2 / phoenix-4.14.0-cdh5. client.jar hbase-1.2.0-14.2-cdh5.14.2 / lib /
  . 3, the installation directory under phoenix phoenix-core-4.14.0-cdh5.14.2.jar into the lib hbase the directory
   $ cp phoenix-4.14 cdh5.14.2-.0 / Phoenix-Core-4.14.0 HBase-1.2.0-cdh5.14.2.jar-cdh5.14.2 / lib /
  . 4, the file hbase-site hbase / conf directory of the cover into the bin phoenix directory
      $ cp hbase-1.2.0-cdh5.14.2 / conf / hbase-the site.xml phoenix-4.14.0-cdh5.14.2 / bin /
  5, restart the process hbase 
  6 , starting phoenix client interactive command
    $ Bin / sqlline.py zkip: 2181
  first start relatively long time to initialize operation creates some tables
  if the message argparse error: $ sudo yum -y install python- argparse

Integration Testing:
- "Show Databases or show tables that are not supported, and mysql does not operate in exactly the same
-" help to see built-in command!
- "View the Tables Table hbase with phoenix establish a good map!
Created by phoenix clients -" table
Create table user_ph (
ID VARCHAR Primary Key,
name VARCHAR,
password VARCHAR
);
- "view through the shell HBase List
 phoenix the table names and field names are not the default double quotes are capitalized
 in double quotes is case sensitive
 phoenix and the RDBMS as data types
- "hbase shell by desc 'USER_PH'
 listed cluster default name is 0, nAME => '0'
-" re-created and specified column cluster: column 
drop table user_ph;
 
Create table " user_ph "(
" ID "VARCHAR Primary Key,
". "" info name "VARCHAR,
" password info "VARCHAR". "
);

- "Add Data:
 UPDATA + INSERT combined command -" upsert
 when inserting data table and column names are lowercase so as to double quotes
 when the string is only in single quotes otherwise an error
 phoenix created when the table primary key column default hbase table RowKey
the upsert INTO "user_ph" ( "ID", "info". "name", "info." "password") values ( '001', 'ADMIN', 'ADMIN') ;
the upsert INTO "user_ph" (.. "ID", "info" "name", "info" "password") values ( '002', 'ADMIN', 'ADMIN');
the upsert INTO "user_ph" ( "ID "," info name "," info password ") values ( '003', 'admin', 'admin')". "". ";

- "query data:
the SELECT * from" user_ph ";
Scan" user_ph " 
 
-" delete the data:
the Delete from "user_ph" the WHERE "the above mentioned id '=' 002 ';

- "crud conducted in phoenix in the client interface (CRUD) operations with most of the same RDBMS operation
 
 
-" Exit phonix Client Command Line
quit!

Guess you like

Origin www.cnblogs.com/hejunhong/p/12158951.html