Skip to content

Commit

Permalink
Addressed checkstyle and RAT issues
Browse files Browse the repository at this point in the history
  • Loading branch information
devabhishekpal committed Oct 11, 2024
1 parent 8e93f5c commit 44bad3b
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
/*
* 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
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* 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.
*
*/

package org.apache.hadoop.ozone.conf;

import org.apache.hadoop.hdds.conf.OzoneConfiguration;
Expand All @@ -16,6 +34,9 @@
import java.io.IOException;
import java.util.Collection;

/**
* Config based utilities for Ozone S3
*/
public final class OzoneS3ConfigUtils {
static final Logger LOG = LoggerFactory.getLogger(OzoneS3ConfigUtils.class);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,12 +129,12 @@ private T createOMProxy() throws IOException {
}

/**
* Get the protocol proxy for provided address
* Get the protocol proxy for provided address.
* @param address An instance of {@link InetSocketAddress} which contains the address to connect
* @return the proxy connection to the address and the set of methods supported by the server at the address
* @throws IOException if any error occurs while trying to get the proxy
*/
private T createOmProxy(InetSocketAddress address) throws IOException{
private T createOmProxy(InetSocketAddress address) throws IOException {
Configuration hadoopConf =
LegacyHadoopConfigurationSource.asHadoopConfiguration(getConf());

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
/*
* 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
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* 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.
*
*/

package org.apache.hadoop.ozone.conf;

import org.apache.hadoop.hdds.conf.OzoneConfiguration;
Expand All @@ -9,7 +27,10 @@

import static org.assertj.core.api.Assertions.assertThat;

public class TestOzoneConfigUtils {
/**
* This class is to test S3 configuration based utils
*/
public class TestOzoneS3ConfigUtils {

@Test
public void testS3AdminExtraction() throws IOException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,10 @@
import org.apache.hadoop.hdds.client.ECReplicationConfig;
import org.apache.hadoop.hdds.client.RatisReplicationConfig;
import org.apache.hadoop.hdds.client.ReplicationConfig;
import org.apache.hadoop.hdds.conf.OzoneConfiguration;
import org.apache.hadoop.hdds.protocol.proto.HddsProtos;
import org.apache.hadoop.ozone.OzoneConfigKeys;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

import java.io.IOException;
import java.util.Arrays;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
Expand Down

0 comments on commit 44bad3b

Please sign in to comment.