HBASE-19610 Fixed Checkstyle errors in hbase-protocol and enabled Checkstyle to fail on violations
This commit is contained in:
parent
6b39062e86
commit
3ed68fd70d
|
@ -112,6 +112,22 @@
|
||||||
</replacements>
|
</replacements>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-checkstyle-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>checkstyle</id>
|
||||||
|
<phase>validate</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>check</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<failOnViolation>true</failOnViolation>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
<pluginManagement>
|
<pluginManagement>
|
||||||
<plugins>
|
<plugins>
|
||||||
|
|
|
@ -61,7 +61,7 @@ public final class HBaseZeroCopyByteString extends LiteralByteString {
|
||||||
/**
|
/**
|
||||||
* Extracts the byte array from the given {@link ByteString} without copy.
|
* Extracts the byte array from the given {@link ByteString} without copy.
|
||||||
* @param buf A buffer from which to extract the array. This buffer must be
|
* @param buf A buffer from which to extract the array. This buffer must be
|
||||||
* actually an instance of a {@code LiteralByteString}.
|
* actually an instance of a {@code LiteralByteString}.
|
||||||
* @return byte[] representation
|
* @return byte[] representation
|
||||||
*/
|
*/
|
||||||
public static byte[] zeroCopyGetBytes(final ByteString buf) {
|
public static byte[] zeroCopyGetBytes(final ByteString buf) {
|
||||||
|
|
|
@ -17,18 +17,18 @@
|
||||||
*/
|
*/
|
||||||
package org.apache.hadoop.hbase.util;
|
package org.apache.hadoop.hbase.util;
|
||||||
|
|
||||||
|
import com.google.protobuf.ByteString;
|
||||||
|
import com.google.protobuf.HBaseZeroCopyByteString;
|
||||||
|
|
||||||
import org.apache.yetus.audience.InterfaceAudience;
|
import org.apache.yetus.audience.InterfaceAudience;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import com.google.protobuf.ByteString;
|
|
||||||
import com.google.protobuf.HBaseZeroCopyByteString;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Hack to workaround HBASE-10304 issue that keeps bubbling up when a mapreduce context.
|
* Hack to workaround HBASE-10304 issue that keeps bubbling up when a mapreduce context.
|
||||||
*/
|
*/
|
||||||
@InterfaceAudience.Private
|
@InterfaceAudience.Private
|
||||||
public class ByteStringer {
|
public final class ByteStringer {
|
||||||
private static final Logger LOG = LoggerFactory.getLogger(ByteStringer.class);
|
private static final Logger LOG = LoggerFactory.getLogger(ByteStringer.class);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue