Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion dev-support/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,9 @@ pipeline {
environment {
BASEDIR = "${env.WORKSPACE}/component"
TESTS = "${env.SHALLOW_CHECKS}"
SET_JAVA_HOME = '/usr/lib/jvm/java-8'
SET_JAVA_HOME = "/usr/lib/jvm/java-11"
// Activates hadoop 3.0 profile in maven runs.
HADOOP_PROFILE = '3.0'
OUTPUT_DIR_RELATIVE = "${env.OUTPUT_DIR_RELATIVE_GENERAL}"
OUTPUT_DIR = "${env.WORKSPACE}/${env.OUTPUT_DIR_RELATIVE_GENERAL}"
ASF_NIGHTLIES_GENERAL_CHECK_BASE="${ASF_NIGHTLIES_BASE}/${OUTPUT_DIR_RELATIVE}"
Expand Down
2 changes: 1 addition & 1 deletion dev-support/Jenkinsfile_GitHub
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ pipeline {
environment {
// customized per parallel stage
PLUGINS = "${GENERAL_CHECK_PLUGINS}"
SET_JAVA_HOME = '/usr/lib/jvm/java-8'
SET_JAVA_HOME = "/usr/lib/jvm/java-11"
WORKDIR_REL = "${WORKDIR_REL_GENERAL_CHECK}"
// identical for all parallel stages
WORKDIR = "${WORKSPACE}/${WORKDIR_REL}"
Expand Down
39 changes: 21 additions & 18 deletions hbase-build-configuration/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,6 @@
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<properties>
<!-- https://errorprone.info/docs/installation Maven section has details -->
<!-- required when compiling with JDK 8 -->
<javac.version>9+181-r4173-1</javac.version>
</properties>
<dependencies>
<dependency>
<groupId>com.google.errorprone</groupId>
Expand All @@ -86,12 +81,6 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.google.errorprone</groupId>
<artifactId>javac</artifactId>
<version>${javac.version}</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<plugins>
Expand All @@ -100,17 +89,12 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>${compileSource}</source>
<target>${compileSource}</target>
<!-- required when compiling with JDK 8 -->
<fork>true</fork>
<release>${releaseTarget}</release>
<showWarnings>true</showWarnings>
<compilerArgs>
<arg>-XDcompilePolicy=simple</arg>
<!-- All -Xep need to be on single line see: https://github.com/google/error-prone/pull/1115 -->
<arg>-Xplugin:ErrorProne -XepDisableWarningsInGeneratedCode -Xep:FallThrough:OFF -Xep:MutablePublicArray:OFF -Xep:ClassNewInstance:ERROR -Xep:MissingDefault:ERROR</arg>
<!-- Required when compiling with JDK 8 -->
<arg>-J-Xbootclasspath/p:${settings.localRepository}/com/google/errorprone/javac/${javac.version}/javac-${javac.version}.jar</arg>
<arg>-Xplugin:ErrorProne -XepDisableWarningsInGeneratedCode -Xep:FallThrough:OFF -Xep:MutablePublicArray:OFF -Xep:ClassNewInstance:ERROR -Xep:MissingDefault:ERROR -Xep:BanJNDI:WARN</arg>
</compilerArgs>
<annotationProcessorPaths>
<path>
Expand All @@ -121,6 +105,25 @@
</annotationProcessorPaths>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<executions>
<execution>
<id>jdk11-required</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireJavaVersion>
<version>[11,)</version>
</requireJavaVersion>
</rules>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,21 +36,17 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import org.apache.hbase.thirdparty.com.google.common.collect.ImmutableSet;

/**
* Base class for command lines that start up various HBase daemons.
*/
@InterfaceAudience.Private
public abstract class ServerCommandLine extends Configured implements Tool {
private static final Logger LOG = LoggerFactory.getLogger(ServerCommandLine.class);
@SuppressWarnings("serial")
private static final Set<String> DEFAULT_SKIP_WORDS = new HashSet<String>() {
{
add("secret");
add("passwd");
add("password");
add("credential");
}
};

private static final Set<String> DEFAULT_SKIP_WORDS =
ImmutableSet.of("secret", "passwd", "password", "credential");

/**
* Implementing subclasses should return a usage string to print out.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -542,14 +542,15 @@ public void testScanAndConcurrentMajorCompact() throws Exception {
}
}

/*
* @param hri Region
/**
* Count table.
* @param hri Region
* @param flushIndex At what row we start the flush.
* @param concurrent if the flush should be concurrent or sync.
* @return Count of rows found.
*/
private int count(final Table countTable, final int flushIndex, boolean concurrent)
throws IOException {
throws Exception {
LOG.info("Taking out counting scan");
Scan scan = new Scan();
for (byte[] qualifier : EXPLICIT_COLS) {
Expand Down Expand Up @@ -577,10 +578,10 @@ public void run() {
}
}
};
if (concurrent) {
t.start(); // concurrently flush.
} else {
t.run(); // sync flush
t.start();
if (!concurrent) {
// sync flush
t.join();
}
LOG.info("Continuing on after kicking off background flush");
justFlushed = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@

import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.UUID;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
Expand All @@ -45,6 +43,8 @@
import org.junit.Test;
import org.junit.experimental.categories.Category;

import org.apache.hbase.thirdparty.com.google.common.collect.ImmutableMap;

@Category({ MediumTests.class, ReplicationTests.class })
public class TestNonHBaseReplicationEndpoint {

Expand Down Expand Up @@ -86,11 +86,8 @@ public void test() throws IOException {

ReplicationPeerConfig peerConfig = ReplicationPeerConfig.newBuilder()
.setReplicationEndpointImpl(NonHBaseReplicationEndpoint.class.getName())
.setReplicateAllUserTables(false).setTableCFsMap(new HashMap<TableName, List<String>>() {
{
put(tableName, new ArrayList<>());
}
}).build();
.setReplicateAllUserTables(false)
.setTableCFsMap(ImmutableMap.of(tableName, new ArrayList<>())).build();

ADMIN.addReplicationPeer("1", peerConfig);
loadData(table);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,8 @@ public void testEOFExceptionForRecoveredQueue() throws Exception {
localLogQueue.enqueueLog(emptyLog, fakeWalGroupId);
ReplicationSourceWALReader reader = new ReplicationSourceWALReader(fs, conf, localLogQueue, 0,
getDummyFilter(), source, fakeWalGroupId);
reader.run();
reader.start();
reader.join();
// ReplicationSourceWALReaderThread#handleEofException method will
// remove empty log from logQueue.
assertEquals(0, localLogQueue.getQueueSize(fakeWalGroupId));
Expand Down Expand Up @@ -650,7 +651,8 @@ public void testEOFExceptionForRecoveredQueueWithMultipleLogs() throws Exception
getDummyFilter(), source, fakeWalGroupId);
assertEquals("Initial log queue size is not correct", 2,
localLogQueue.getQueueSize(fakeWalGroupId));
reader.run();
reader.start();
reader.join();

// remove empty log from logQueue.
assertEquals(0, localLogQueue.getQueueSize(fakeWalGroupId));
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -840,7 +840,7 @@
-->
<checkstyle.version>8.29</checkstyle.version>
<exec.maven.version>1.6.0</exec.maven.version>
<error-prone.version>2.10.0</error-prone.version>
<error-prone.version>2.16</error-prone.version>
<jamon.plugin.version>2.4.2</jamon.plugin.version>
<lifecycle.mapping.version>1.0.0</lifecycle.mapping.version>
<maven.antrun.version>1.8</maven.antrun.version>
Expand Down