关于hbase二级索引的描述 hbase的二级索引应用( 二 )


x00x00x12x12x00x00x00x0D1538216707720 column=f:area, timestamp=1538216707892, value=https://www.520longzhigu.com/shenghuo/xE6xB1x9FxE5x8Cx97xE5x8CxBA
x00x00x12x12x00x00x00x0D1538216707720 column=f:authId, timestamp=1538216707892, value=https://www.520longzhigu.com/shenghuo/
x00x00x12x12x00x00x00x0D1538216707720 column=f:city, timestamp=1538216707892, value=https://www.520longzhigu.com/shenghuo/xE9x87x8DxE5xBAx86xE5xB8x82
x00x00x12x12x00x00x00x0D1538216707720 column=f:imei, timestamp=1538216707892, value=https://www.520longzhigu.com/shenghuo/AF36147F-8106-47F0-B58F-A3FB75DBE325
x00x00x12x12x00x00x00x0D1538216707720 column=f:lat, timestamp=1538216707892, value=https://www.520longzhigu.com/shenghuo/29.577587127685547
x00x00x12x12x00x00x00x0D1538216707720 column=f:lon, timestamp=1538216707892, value=https://www.520longzhigu.com/shenghuo/106.50493621826172
x00x00x12x12x00x00x00x0D1538216707720 column=f:memberType, timestamp=1538216707892, value=https://www.520longzhigu.com/shenghuo/0
x00x00x12x12x00x00x00x0D1538216707720 column=f:mobileManufacturer, timestamp=1538216707892, value=https://www.520longzhigu.com/shenghuo/iPhone
x00x00x12x12x00x00x00x0D1538216707720 column=f:mobileModel, timestamp=1538216707892, value=https://www.520longzhigu.com/shenghuo/iPhone 6 Plus
x00x00x12x12x00x00x00x0D1538216707720 column=f:province, timestamp=1538216707892, value=https://www.520longzhigu.com/shenghuo/xE9x87x8DxE5xBAx86xE5xB8x82
x00x00x12x12x00x00x00x0D1538216707720 column=f:systemType, timestamp=1538216707892, value=https://www.520longzhigu.com/shenghuo/1
x00x00x12x12x00x00x00x0D1538216707720 column=f:systemVersion, timestamp=1538216707892, value=https://www.520longzhigu.com/shenghuo/12.0
x00x00x12x12x00x00x00x0D1538216707720 column=f:time, timestamp=1538216707892, value=https://www.520longzhigu.com/shenghuo/1538216707720
1 row(s) in 0.0460 seconds(可左右滑动)
2. Phoenix 中创建与 namespace 名称一致的 schema
0: jdbc:phoenix:> create schema if not exists "ns1000";
No rows affected (0.012 seconds)
(可左右滑动)
3. Phoenix 中创建视图,并查询数据及条数
0: jdbc:phoenix:> use "ns1000";
No rows affected (0.021 seconds)
0: jdbc:phoenix:> create view "operate_log"(
. . . . . . . . > "pk" varchar primary key,
. . . . . . . . > "f"."appVersion" varchar,
. . . . . . . . > "f"."city" varchar,
. . . . . . . . > "f"."lat" varchar,
. . . . . . . . > "f"."lon" varchar,
. . . . . . . . > "f"."memberType" varchar,
. . . . . . . . > "f"."time" varchar);
No rows affected (6.555 seconds)
0: jdbc:phoenix:> !tables
+------------+--------------+--------------+---------------+----------+------------+----------------------------+-----------------+--------------+-----------------+---------------+---------------+-----------------+------------+--------+| TABLE_CAT | TABLE_SCHEM | TABLE_NAME | TABLE_TYPE | REMARKS | TYPE_NAME | SELF_REFERENCING_COL_NAME | REF_GENERATION | INDEX_STATE | IMMUTABLE_ROWS | SALT_BUCKETS | MULTI_TENANT | VIEW_STATEMENT | VIEW_TYPE | INDEX_ |
+------------+--------------+--------------+---------------+----------+------------+----------------------------+-----------------+--------------+-----------------+---------------+---------------+-----------------+------------+--------+| | SYSTEM | CATALOG | SYSTEM TABLE | | | | | | false | | false | | | |
| | SYSTEM | FUNCTION | SYSTEM TABLE | | | | | | false | | false | | | |
| | SYSTEM | LOG | SYSTEM TABLE | | | | | | true | 32 | false | | | |
| | SYSTEM | SEQUENCE | SYSTEM TABLE | | | | | | false | | false | | | |
| | SYSTEM | STATS | SYSTEM TABLE | | | | | | false | | false | | | |
| | ns1000 | operate_log | VIEW | | | | | | false | | false | | MAPPED | |
+------------+--------------+--------------+---------------+----------+------------+----------------------------+-----------------+--------------+-----------------+---------------+---------------+-----------------+------------+--------+0: jdbc:phoenix:> !columns "operate_log";


以上关于本文的内容,仅作参考!温馨提示:如遇健康、疾病相关的问题,请您及时就医或请专业人士给予相关指导!

「四川龙网」www.sichuanlong.com小编还为您精选了以下内容,希望对您有所帮助: