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
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@

import com.google.common.annotations.VisibleForTesting;
import org.apache.hadoop.hdds.conf.OzoneConfiguration;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.ozone.client.OzoneClient;
import org.apache.hadoop.ozone.client.OzoneClientFactory;
import org.apache.hadoop.ozone.om.protocol.S3Auth;
Expand Down Expand Up @@ -63,9 +62,6 @@ public class OzoneClientProducer {
@Inject
private OzoneConfiguration ozoneConfiguration;

@Inject
private Text omService;

@Inject
private String omServiceID;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,7 @@
package org.apache.hadoop.ozone.s3;

import org.apache.hadoop.hdds.conf.OzoneConfiguration;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.ozone.OmUtils;
import org.apache.hadoop.ozone.s3.util.OzoneS3Util;
import org.apache.hadoop.security.SecurityUtil;

import javax.annotation.PostConstruct;
import javax.enterprise.context.ApplicationScoped;
Expand All @@ -40,9 +37,7 @@
@ApplicationScoped
public class OzoneServiceProvider {

private Text omServiceAddr;

private String omserviceID;
private String omServiceID;

@Inject
private OzoneConfiguration conf;
Expand All @@ -51,11 +46,7 @@ public class OzoneServiceProvider {
public void init() {
Collection<String> serviceIdList =
conf.getTrimmedStringCollection(OZONE_OM_SERVICE_IDS_KEY);
if (serviceIdList.size() == 0) {
// Non-HA cluster
omServiceAddr = SecurityUtil.buildTokenService(OmUtils.
getOmAddressForClients(conf));
} else {
if (!serviceIdList.isEmpty()) {
// HA cluster.
//For now if multiple service id's are configured we throw exception.
// As if multiple service id's are configured, S3Gateway will not be
Expand All @@ -73,22 +64,14 @@ public void init() {
throw new IllegalArgumentException(OZONE_OM_NODES_KEY
+ "." + serviceId + " is not defined");
}
omServiceAddr = new Text(OzoneS3Util.buildServiceNameForToken(conf,
serviceId, omNodeIds));
omserviceID = serviceId;
omServiceID = serviceId;
}
}
}


@Produces
public Text getService() {
return omServiceAddr;
}

@Produces
public String getOmServiceID() {
return omserviceID;
return omServiceID;
}

}

This file was deleted.

This file was deleted.