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
3 changes: 1 addition & 2 deletions hbase-hbck2/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -161,10 +161,9 @@
<artifactId>log4j-core</artifactId>
<version>${log4j2.version}</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.logging.log4j/log4j-1.2-api -->
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-1.2-api</artifactId>
<artifactId>log4j-slf4j-impl</artifactId>
<version>${log4j2.version}</version>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
import org.apache.hadoop.hbase.regionserver.HRegionFileSystem;
import org.apache.hadoop.hbase.util.CommonFSUtils;
import org.apache.hadoop.hbase.util.FSUtils;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.io.Closeable;
import java.io.IOException;
Expand All @@ -51,7 +51,7 @@
* meta information found on HDFS region dirs as the valid ones.
*/
public class FsRegionsMetaRecoverer implements Closeable {
private static final Logger LOG = LogManager.getLogger(FsRegionsMetaRecoverer.class);
private static final Logger LOG = LoggerFactory.getLogger(FsRegionsMetaRecoverer.class);
private final FileSystem fs;
private final Connection conn;
private final Configuration config;
Expand Down Expand Up @@ -95,7 +95,7 @@ public Map<TableName,List<Path>> reportTablesMissingRegions(final List<String> n
result.put(tableName,
findMissingRegionsInMETA(tableName.getNameWithNamespaceInclAsString()));
} catch (Exception e) {
LOG.warn(e);
LOG.warn("Can't get missing regions from meta", e);
}
});
return result;
Expand Down
8 changes: 4 additions & 4 deletions hbase-hbck2/src/main/java/org/apache/hbase/HBCK2.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,9 @@
import org.apache.hadoop.hbase.util.Pair;

import org.apache.logging.log4j.Level;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.core.config.Configurator;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import org.apache.hbase.thirdparty.org.apache.commons.cli.CommandLine;
import org.apache.hbase.thirdparty.org.apache.commons.cli.CommandLineParser;
Expand All @@ -73,6 +72,7 @@

import org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos;


/**
* HBase fixup tool version 2, for hbase-2.0.0+ clusters.
* Supercedes hbck1.
Expand All @@ -83,7 +83,7 @@
// then add a hbase-site.xml onto CLASSPATH for this tool to pick up.
// + Add --version
public class HBCK2 extends Configured implements org.apache.hadoop.util.Tool {
private static final Logger LOG = LogManager.getLogger(HBCK2.class);
private static final Logger LOG = LoggerFactory.getLogger(HBCK2.class);
private static final int EXIT_SUCCESS = 0;
static final int EXIT_FAILURE = 1;
// Commands
Expand Down
6 changes: 3 additions & 3 deletions hbase-hbck2/src/test/java/org/apache/hbase/TestHBCK2.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@
import org.apache.hadoop.hbase.master.RegionState;
import org.apache.hadoop.hbase.util.Bytes;
import org.apache.hadoop.hbase.util.Threads;
import org.apache.logging.log4j.LogManager;
import org.junit.AfterClass;
import org.junit.Assert;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TestName;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.io.OutputStream;
import java.io.PrintStream;
Expand All @@ -63,7 +63,7 @@
* @see TestHBCKCommandLineParsing
*/
public class TestHBCK2 {
private static final org.apache.logging.log4j.Logger LOG = LogManager.getLogger(TestHBCK2.class);
private static final Logger LOG = LoggerFactory.getLogger(TestHBCK2.class);
private final static HBaseTestingUtility TEST_UTIL = new HBaseTestingUtility();
private static final TableName TABLE_NAME = TableName.valueOf(TestHBCK2.class.getSimpleName());
private static final TableName REGION_STATES_TABLE_NAME = TableName.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
import org.apache.hadoop.hbase.client.Scan;
import org.apache.hadoop.hbase.client.Table;
import org.apache.hadoop.hbase.util.Bytes;
import org.apache.logging.log4j.LogManager;
import org.junit.BeforeClass;
import org.junit.Rule;
import org.junit.Test;
Expand All @@ -43,7 +42,6 @@
*/
public class TestHBCKMetaTableAccessor {

private static final org.apache.logging.log4j.Logger LOG = LogManager.getLogger(TestHBCK2.class);
private final static HBaseTestingUtility TEST_UTIL = new HBaseTestingUtility();

@Rule
Expand Down
15 changes: 14 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,8 @@
<maven.checkstyle.version>3.0.0</maven.checkstyle.version>
<hbase.checkstyle.version>2.2.0</hbase.checkstyle.version>
<commons-lang3.version>3.9</commons-lang3.version>
<enforcer.version>3.0.0-M2</enforcer.version>
<extra.enforcer.version>1.0-beta-9</extra.enforcer.version>
</properties>
<dependencyManagement>
<dependencies>
Expand Down Expand Up @@ -414,6 +416,14 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>${enforcer.version}</version>
<dependencies>
<dependency>
<groupId>org.codehaus.mojo</groupId>
<artifactId>extra-enforcer-rules</artifactId>
<version>${extra.enforcer.version}</version>
</dependency>
</dependencies>
<configuration>
<rules>
<enforceBytecodeVersion>
Expand All @@ -424,7 +434,10 @@
either "mvn -version" or "mvn enforcer:display-info" to verify what version is active.
Non-release builds can temporarily build with a newer JDK version by setting the
'compileSource' property (eg. mvn -DcompileSource=1.8 clean package).
</message>
</message>
<ignoreClasses>
<ignoreClass>module-info</ignoreClass>
</ignoreClasses>
</enforceBytecodeVersion>
</rules>
</configuration>
Expand Down