Skip to content

Commit b34dcb5

Browse files
authored
HADOOP-18025. Upgrade HBase version to 1.7.1 for hbase1 profile (#3722)
1 parent df41975 commit b34dcb5

File tree

9 files changed

+56
-29
lines changed

9 files changed

+56
-29
lines changed

LICENSE-binary

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -297,10 +297,10 @@ org.apache.curator:curator-client:5.2.0
297297
org.apache.curator:curator-framework:5.2.0
298298
org.apache.curator:curator-recipes:5.2.0
299299
org.apache.geronimo.specs:geronimo-jcache_1.0_spec:1.0-alpha-1
300-
org.apache.hbase:hbase-annotations:1.4.8
301-
org.apache.hbase:hbase-client:1.4.8
302-
org.apache.hbase:hbase-common:1.4.8
303-
org.apache.hbase:hbase-protocol:1.4.8
300+
org.apache.hbase:hbase-annotations:1.7.1
301+
org.apache.hbase:hbase-client:1.7.1
302+
org.apache.hbase:hbase-common:1.7.1
303+
org.apache.hbase:hbase-protocol:1.7.1
304304
org.apache.htrace:htrace-core:3.1.0-incubating
305305
org.apache.htrace:htrace-core4:4.1.0-incubating
306306
org.apache.httpcomponents:httpclient:4.5.6

hadoop-project/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@
196196

197197
<swagger-annotations-version>1.5.4</swagger-annotations-version>
198198
<snakeyaml.version>1.26</snakeyaml.version>
199-
<hbase.one.version>1.4.8</hbase.one.version>
199+
<hbase.one.version>1.7.1</hbase.one.version>
200200
<hbase.two.version>2.0.2</hbase.two.version>
201201
<junit.version>4.13.2</junit.version>
202202
<junit.jupiter.version>5.5.1</junit.jupiter.version>
@@ -2393,7 +2393,7 @@
23932393
</activation>
23942394
<properties>
23952395
<hbase.version>${hbase.one.version}</hbase.version>
2396-
<hbase-compatible-hadoop.version>2.5.1</hbase-compatible-hadoop.version>
2396+
<hbase-compatible-hadoop.version>2.8.5</hbase-compatible-hadoop.version>
23972397
<hbase-compatible-guava.version>12.0.1</hbase-compatible-guava.version>
23982398
<hbase-server-artifactid>hadoop-yarn-server-timelineservice-hbase-server-1</hbase-server-artifactid>
23992399
</properties>

hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timelineservice-hbase-tests/pom.xml

Lines changed: 33 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,10 @@
9696
<groupId>tomcat</groupId>
9797
<artifactId>jasper-runtime</artifactId>
9898
</exclusion>
99+
<exclusion>
100+
<groupId>org.apache.hadoop</groupId>
101+
<artifactId>hadoop-hdfs-client</artifactId>
102+
</exclusion>
99103
</exclusions>
100104
</dependency>
101105

@@ -106,6 +110,12 @@
106110
<artifactId>hadoop-auth</artifactId>
107111
<version>${hbase-compatible-hadoop.version}</version>
108112
<scope>test</scope>
113+
<exclusions>
114+
<exclusion>
115+
<groupId>org.apache.hadoop</groupId>
116+
<artifactId>hadoop-hdfs-client</artifactId>
117+
</exclusion>
118+
</exclusions>
109119
</dependency>
110120

111121
<dependency>
@@ -117,6 +127,10 @@
117127
<groupId>org.apache.hadoop</groupId>
118128
<artifactId>hadoop-common</artifactId>
119129
</exclusion>
130+
<exclusion>
131+
<groupId>org.apache.hadoop</groupId>
132+
<artifactId>hadoop-hdfs-client</artifactId>
133+
</exclusion>
120134
</exclusions>
121135
</dependency>
122136

@@ -311,6 +325,12 @@
311325
<artifactId>hadoop-hdfs</artifactId>
312326
<version>${hbase-compatible-hadoop.version}</version>
313327
<scope>test</scope>
328+
<exclusions>
329+
<exclusion>
330+
<groupId>org.apache.hadoop</groupId>
331+
<artifactId>hadoop-hdfs-client</artifactId>
332+
</exclusion>
333+
</exclusions>
314334
</dependency>
315335

316336
<!-- 'mvn dependency:analyze' fails to detect use of this direct
@@ -321,6 +341,19 @@
321341
<version>${hbase-compatible-hadoop.version}</version>
322342
<type>test-jar</type>
323343
<scope>test</scope>
344+
<exclusions>
345+
<exclusion>
346+
<groupId>org.apache.hadoop</groupId>
347+
<artifactId>hadoop-hdfs-client</artifactId>
348+
</exclusion>
349+
</exclusions>
350+
</dependency>
351+
352+
<dependency>
353+
<groupId>org.apache.hadoop</groupId>
354+
<artifactId>hadoop-hdfs-client</artifactId>
355+
<version>${hbase-compatible-hadoop.version}</version>
356+
<scope>test</scope>
324357
</dependency>
325358

326359
<dependency>
@@ -470,14 +503,6 @@
470503
</exclusion>
471504
</exclusions>
472505
</dependency>
473-
<!-- 'mvn dependency:analyze' fails to detect use of this direct
474-
dependency -->
475-
<dependency>
476-
<groupId>org.apache.hadoop</groupId>
477-
<artifactId>hadoop-hdfs-client</artifactId>
478-
<version>${hbase-compatible-hadoop.version}</version>
479-
<scope>test</scope>
480-
</dependency>
481506
<!-- 'mvn dependency:analyze' fails to detect use of this direct
482507
dependency -->
483508
<!-- This is needed by HBaseTestingUtility -->

hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timelineservice-hbase/hadoop-yarn-server-timelineservice-hbase-client/src/main/java/org/apache/hadoop/yarn/server/timelineservice/storage/reader/ApplicationEntityReader.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -412,15 +412,15 @@ protected ResultScanner getResults(Configuration hbaseConf,
412412
}
413413

414414
// set start row
415-
scan.setStartRow(applicationRowKey.getRowKey());
415+
scan.withStartRow(applicationRowKey.getRowKey());
416416

417417
// get the bytes for stop row
418418
applicationRowKeyPrefix = new ApplicationRowKeyPrefix(
419419
context.getClusterId(), context.getUserId(), context.getFlowName(),
420420
context.getFlowRunId());
421421

422422
// set stop row
423-
scan.setStopRow(
423+
scan.withStopRow(
424424
HBaseTimelineStorageUtils.calculateTheClosestNextRowKeyForPrefix(
425425
applicationRowKeyPrefix.getRowKeyPrefix()));
426426
}

hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timelineservice-hbase/hadoop-yarn-server-timelineservice-hbase-client/src/main/java/org/apache/hadoop/yarn/server/timelineservice/storage/reader/EntityTypeReader.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,9 +158,11 @@ private static byte[] getNextRowKey(byte[] currRowKeyPrefix,
158158
private ResultScanner getResult(Configuration hbaseConf, Connection conn,
159159
FilterList filterList, byte[] startPrefix, byte[] endPrefix)
160160
throws IOException {
161-
Scan scan = new Scan(startPrefix, endPrefix);
162-
scan.setFilter(filterList);
163-
scan.setSmall(true);
161+
Scan scan = new Scan()
162+
.withStartRow(startPrefix)
163+
.withStopRow(endPrefix)
164+
.setFilter(filterList)
165+
.setSmall(true);
164166
return ENTITY_TABLE.getResultScanner(hbaseConf, conn, scan);
165167
}
166168

hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timelineservice-hbase/hadoop-yarn-server-timelineservice-hbase-client/src/main/java/org/apache/hadoop/yarn/server/timelineservice/storage/reader/FlowActivityEntityReader.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -133,16 +133,16 @@ && getFilters().getCreatedTimeEnd() == Long.MAX_VALUE) {
133133
throw new BadRequestException(
134134
"fromid doesn't belong to clusterId=" + clusterId);
135135
}
136-
scan.setStartRow(key.getRowKey());
137-
scan.setStopRow(
136+
scan.withStartRow(key.getRowKey());
137+
scan.withStopRow(
138138
new FlowActivityRowKeyPrefix(clusterId,
139139
(getFilters().getCreatedTimeBegin() <= 0 ? 0
140140
: (getFilters().getCreatedTimeBegin() - 1)))
141141
.getRowKeyPrefix());
142142
} else {
143-
scan.setStartRow(new FlowActivityRowKeyPrefix(clusterId, getFilters()
143+
scan.withStartRow(new FlowActivityRowKeyPrefix(clusterId, getFilters()
144144
.getCreatedTimeEnd()).getRowKeyPrefix());
145-
scan.setStopRow(new FlowActivityRowKeyPrefix(clusterId, (getFilters()
145+
scan.withStopRow(new FlowActivityRowKeyPrefix(clusterId, (getFilters()
146146
.getCreatedTimeBegin() <= 0 ? 0
147147
: (getFilters().getCreatedTimeBegin() - 1))).getRowKeyPrefix());
148148
}

hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timelineservice-hbase/hadoop-yarn-server-timelineservice-hbase-client/src/main/java/org/apache/hadoop/yarn/server/timelineservice/storage/reader/FlowRunEntityReader.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,14 +241,14 @@ protected ResultScanner getResults(Configuration hbaseConf, Connection conn,
241241
"fromid doesn't belong to clusterId=" + context.getClusterId());
242242
}
243243
// set start row
244-
scan.setStartRow(flowRunRowKey.getRowKey());
244+
scan.withStartRow(flowRunRowKey.getRowKey());
245245

246246
// get the bytes for stop row
247247
flowRunRowKeyPrefix = new FlowRunRowKeyPrefix(context.getClusterId(),
248248
context.getUserId(), context.getFlowName());
249249

250250
// set stop row
251-
scan.setStopRow(
251+
scan.withStopRow(
252252
HBaseTimelineStorageUtils.calculateTheClosestNextRowKeyForPrefix(
253253
flowRunRowKeyPrefix.getRowKeyPrefix()));
254254
}

hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timelineservice-hbase/hadoop-yarn-server-timelineservice-hbase-client/src/main/java/org/apache/hadoop/yarn/server/timelineservice/storage/reader/GenericEntityReader.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -519,15 +519,15 @@ protected ResultScanner getResults(Configuration hbaseConf, Connection conn,
519519
}
520520

521521
// set start row
522-
scan.setStartRow(entityRowKey.getRowKey());
522+
scan.withStartRow(entityRowKey.getRowKey());
523523

524524
// get the bytes for stop row
525525
entityRowKeyPrefix = new EntityRowKeyPrefix(context.getClusterId(),
526526
context.getUserId(), context.getFlowName(), context.getFlowRunId(),
527527
context.getAppId(), context.getEntityType(), null, null);
528528

529529
// set stop row
530-
scan.setStopRow(
530+
scan.withStopRow(
531531
HBaseTimelineStorageUtils.calculateTheClosestNextRowKeyForPrefix(
532532
entityRowKeyPrefix.getRowKeyPrefix()));
533533

hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timelineservice-hbase/hadoop-yarn-server-timelineservice-hbase-client/src/main/java/org/apache/hadoop/yarn/server/timelineservice/storage/reader/SubApplicationEntityReader.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -372,15 +372,15 @@ protected ResultScanner getResults(Configuration hbaseConf, Connection conn,
372372
}
373373

374374
// set start row
375-
scan.setStartRow(entityRowKey.getRowKey());
375+
scan.withStartRow(entityRowKey.getRowKey());
376376

377377
// get the bytes for stop row
378378
subApplicationRowKeyPrefix = new SubApplicationRowKeyPrefix(
379379
context.getDoAsUser(), context.getClusterId(),
380380
context.getEntityType(), null, null, null);
381381

382382
// set stop row
383-
scan.setStopRow(
383+
scan.withStopRow(
384384
HBaseTimelineStorageUtils.calculateTheClosestNextRowKeyForPrefix(
385385
subApplicationRowKeyPrefix.getRowKeyPrefix()));
386386

0 commit comments

Comments
 (0)