Skip to content

Commit

Permalink
fix ut & checkstyle
Browse files Browse the repository at this point in the history
  • Loading branch information
KeeProMise committed Jul 25, 2024
1 parent c311ab6 commit 21a1b1a
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@
@InterfaceStability.Stable
public class ClientNamenodeProtocolTranslatorPB implements
ProtocolMetaInterface, ClientProtocol, Closeable, ProtocolTranslator {
final protected ClientNamenodeProtocolPB rpcProxy;
final private ClientNamenodeProtocolPB rpcProxy;

protected static final GetServerDefaultsRequestProto VOID_GET_SERVER_DEFAULT_REQUEST =
GetServerDefaultsRequestProto.newBuilder().build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,15 +200,9 @@
import org.apache.hadoop.security.proto.SecurityProtos.GetDelegationTokenRequestProto;
import org.apache.hadoop.security.proto.SecurityProtos.RenewDelegationTokenRequestProto;
import org.apache.hadoop.security.token.Token;

import org.apache.hadoop.thirdparty.protobuf.ByteString;

import org.apache.hadoop.util.Lists;

import static org.apache.hadoop.ha.proto.HAServiceProtocolProtos.HAServiceStateProto.ACTIVE;
import static org.apache.hadoop.ha.proto.HAServiceProtocolProtos.HAServiceStateProto.INITIALIZING;
import static org.apache.hadoop.ha.proto.HAServiceProtocolProtos.HAServiceStateProto.OBSERVER;
import static org.apache.hadoop.hdfs.protocol.proto.HdfsServerProtos.NNHAStatusHeartbeatProto.State.STANDBY;
import static org.apache.hadoop.hdfs.protocolPB.AsyncRpcProtocolPBUtil.asyncIpcClient;

/**
Expand All @@ -219,9 +213,11 @@
@InterfaceAudience.Private
@InterfaceStability.Stable
public class RouterClientProtocolTranslatorPB extends ClientNamenodeProtocolTranslatorPB {
private final ClientNamenodeProtocolPB rpcProxy;

public RouterClientProtocolTranslatorPB(ClientNamenodeProtocolPB proxy) {
super(proxy);
rpcProxy = proxy;
}

@Override
Expand Down Expand Up @@ -1827,7 +1823,7 @@ public void removeErasureCodingPolicy(String ecPolicyName)
public void enableErasureCodingPolicy(String ecPolicyName)
throws IOException {
if (!Client.isAsynchronousMode()) {
super.removeErasureCodingPolicy(ecPolicyName);
super.enableErasureCodingPolicy(ecPolicyName);
return;
}
EnableErasureCodingPolicyRequestProto.Builder builder =
Expand All @@ -1843,7 +1839,7 @@ public void enableErasureCodingPolicy(String ecPolicyName)
public void disableErasureCodingPolicy(String ecPolicyName)
throws IOException {
if (!Client.isAsynchronousMode()) {
super.removeErasureCodingPolicy(ecPolicyName);
super.disableErasureCodingPolicy(ecPolicyName);
return;
}
DisableErasureCodingPolicyRequestProto.Builder builder =
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

/**
* This package contains the implementation of the Protocol Buffers
* protocols related to HDFS Router.
*/
@InterfaceAudience.Private
@InterfaceStability.Evolving

package org.apache.hadoop.hdfs.protocolPB;

import org.apache.hadoop.classification.InterfaceAudience;
import org.apache.hadoop.classification.InterfaceStability;

0 comments on commit 21a1b1a

Please sign in to comment.