Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
matrix
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
CI / CD
CI / CD
Pipelines
Schedules
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
mall
arch
matrix
Commits
b3336207
Commit
b3336207
authored
Mar 18, 2020
by
haozi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完善Hbase demo,测试通过
parent
17fd3674
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
6 deletions
+15
-6
pom.xml
matrix-bigdata/matrix-bigdata-demo/pom.xml
+7
-0
Application.java
matrix-bigdata/matrix-bigdata-demo/src/main/java/com/secoo/mall/Application.java
+1
-1
SimpleHBase.java
matrix-bigdata/matrix-bigdata-demo/src/main/java/com/secoo/mall/hbase/SimpleHBase.java
+6
-4
application.yml
matrix-bigdata/matrix-bigdata-demo/src/main/resources/application.yml
+1
-1
No files found.
matrix-bigdata/matrix-bigdata-demo/pom.xml
View file @
b3336207
...
@@ -20,6 +20,13 @@
...
@@ -20,6 +20,13 @@
<dependency>
<dependency>
<groupId>
com.secoo.mall
</groupId>
<groupId>
com.secoo.mall
</groupId>
<artifactId>
logger-starter
</artifactId>
<artifactId>
logger-starter
</artifactId>
<!--解决启动加载apollo,Config空指针问题-->
<exclusions>
<exclusion>
<artifactId>
apollo-client
</artifactId>
<groupId>
com.ctrip.framework.apollo
</groupId>
</exclusion>
</exclusions>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>
com.secoo.mall
</groupId>
<groupId>
com.secoo.mall
</groupId>
...
...
matrix-bigdata/matrix-bigdata-demo/src/main/java/mall/Application.java
→
matrix-bigdata/matrix-bigdata-demo/src/main/java/
com/secoo/
mall/Application.java
View file @
b3336207
package
mall
;
package
com
.
secoo
.
mall
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.SpringApplication
;
...
...
matrix-bigdata/matrix-bigdata-demo/src/main/java/mall/hbase/SimpleHBase.java
→
matrix-bigdata/matrix-bigdata-demo/src/main/java/
com/secoo/
mall/hbase/SimpleHBase.java
View file @
b3336207
package
mall
.
hbase
;
package
com
.
secoo
.
mall
.
hbase
;
import
com.secoo.mall.hbase.spring.boot.autoconfigure.HbaseTemplate
;
import
com.secoo.mall.hbase.spring.boot.autoconfigure.HbaseTemplate
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
...
@@ -53,7 +53,9 @@ public class SimpleHBase implements InitializingBean {
...
@@ -53,7 +53,9 @@ public class SimpleHBase implements InitializingBean {
log
.
info
(
"Creating table. "
);
log
.
info
(
"Creating table. "
);
Admin
admin
=
hbaseTemplate
.
getConnection
().
getAdmin
();
Admin
admin
=
hbaseTemplate
.
getConnection
().
getAdmin
();
admin
.
createTable
(
tableDescriptor
);
if
(!
admin
.
tableExists
(
TableName
.
valueOf
(
TABLE_NAME
))){
admin
.
createTable
(
tableDescriptor
);
}
log
.
info
(
" Done."
);
log
.
info
(
" Done."
);
}
}
...
@@ -86,8 +88,8 @@ public class SimpleHBase implements InitializingBean {
...
@@ -86,8 +88,8 @@ public class SimpleHBase implements InitializingBean {
@Override
@Override
public
void
afterPropertiesSet
()
throws
Exception
{
public
void
afterPropertiesSet
()
throws
Exception
{
createTable
();
//
createTable();
// put();
// put();
//
get();
get
();
}
}
}
}
matrix-bigdata/matrix-bigdata-demo/src/main/resources/application.yml
View file @
b3336207
...
@@ -7,4 +7,4 @@ server:
...
@@ -7,4 +7,4 @@ server:
hbase
:
hbase
:
zookeeper
:
zookeeper
:
quorum
:
10.
0.255.184:2181,10.0.255.185:2181,10.0.255.186
:2181
quorum
:
10.
4.3.236:2181,10.4.3.237:2181,10.4.3.235
:2181
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment