Skip to content

Commit

Permalink
AMBARI-25516. Missing @OverRide on 91 methods (apache#3198) (rickyma …
Browse files Browse the repository at this point in the history
…via dgrinenko)
  • Loading branch information
rickyma authored Jun 30, 2020
1 parent a42d52f commit 24dbed2
Show file tree
Hide file tree
Showing 49 changed files with 132 additions and 61 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ public static ZooKeeper open(String serverAddress, int sessionTimeoutMillis, int
{
final CountDownLatch connSignal = new CountDownLatch(1);
ZooKeeper zooKeeper = new ZooKeeper(serverAddress, sessionTimeoutMillis, new Watcher() {
@Override
public void process(WatchedEvent event) {
if (event.getState() == SyncConnected) {
connSignal.countDown();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ public String getEventJson() {
}
}

@Override
public String toString() {
if (event != null) {
return event.toString();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,7 @@ private String getDiskString() {
return ret.toString();
}

@Override
public String toString() {
return "[" +
"hostname=" + this.hostname + "," +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,12 @@ public void setResultStatus(ResultStatus status) {
m_status = status;
}

@Override
public void setResultMetadata(ResultMetadata resultMetadata) {
m_resultMetadata = resultMetadata;
}

@Override
public ResultMetadata getResultMetadata() {
return m_resultMetadata;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
public class FifoLinkedHashMap<K, V> extends
LinkedHashMap<K, V> {
public static final int MAX_ENTRIES = 100;
@Override
protected boolean removeEldestEntry(Map.Entry<K,
V> eldest) {
return size() > MAX_ENTRIES;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ protected CleanupServiceImpl(Set<Cleanable> cleanables) {
* @param cleanupPolicy the policy based on which the cleanup is done
* @return the number of affected rows
*/
@Override
public CleanupResult cleanup(TimeBasedCleanupPolicy cleanupPolicy) {
long affectedRows = 0;
int errorCount = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ public void stop() {
watchdog.interrupt();
}

@Override
public String toString() {
return "SingleFileWatcher:" + file.getName();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -870,6 +870,7 @@ void persistServiceComponentHosts(Set<ServiceComponentHostRequest> requests, boo
/**
* {@inheritDoc}
*/
@Override
public TopologyUpdateEvent getAddedComponentsTopologyEvent(Set<ServiceComponentHostRequest> requests)
throws AmbariException {
TreeMap<String, TopologyCluster> topologyUpdates = new TreeMap<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ public String getHostGroupName() {
return hostGroup;
}

@Override
public String toString() {
return "{ hostname=" + hostname + ", clusterName=" + clusterName + " }";
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ public void setStatus(String status) {
this.status = status;
}

@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("ShortTaskStatusDump ")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ public class ViewPrivilegeRequest extends ViewPrivilegeResponse implements ApiMo
* Hide privilege id in request body schema
* @return privilege id
*/
@Override
@ApiModelProperty(name = PrivilegeResourceProvider.PRIVILEGE_ID_PROPERTY_ID, hidden = true)
public Integer getPrivilegeId() {
return privilegeId;
Expand All @@ -45,6 +46,7 @@ public Integer getPrivilegeId() {
* Hide permission label in request body schema
* @return permission label
*/
@Override
@ApiModelProperty(name = PrivilegeResourceProvider.PERMISSION_LABEL_PROPERTY_ID, hidden = true)
public String getPermissionLabel() {
return permissionLabel;
Expand All @@ -54,6 +56,7 @@ public String getPermissionLabel() {
* Hide view name in request body schema
* @return view name
*/
@Override
@ApiModelProperty(name = ViewPrivilegeResourceProvider.VIEW_NAME_PROPERTY_ID, hidden = true)
public String getViewName() {
return viewName;
Expand All @@ -63,6 +66,7 @@ public String getViewName() {
* Hide view version in request body schema
* @return view version
*/
@Override
@ApiModelProperty(name = ViewPrivilegeResourceProvider.VERSION_PROPERTY_ID, hidden = true)
public String getVersion() {
return version;
Expand All @@ -72,6 +76,7 @@ public String getVersion() {
* Hide view instance name in request body schema
* @return view instance name
*/
@Override
@ApiModelProperty(name = ViewPrivilegeResourceProvider.INSTANCE_NAME_PROPERTY_ID, hidden = true)
public String getInstanceName() {
return instanceName;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,10 +196,12 @@ static String getHadoopAuthCookieValue(Header[] headers) {

private static class EmptyJaasCredentials implements Credentials {

@Override
public String getPassword() {
return null;
}

@Override
public Principal getUserPrincipal() {
return null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ public Void invoke() throws AmbariException {
return getRequestStatus(null);
}

@Override
protected RequestStatus deleteResourcesAuthorized(Request request, Predicate predicate)
throws SystemException, UnsupportedPropertyException,
NoSuchResourceException, NoSuchParentResourceException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ public void setLogSearchReadTimeoutInMilliseconds(int logSearchReadTimeoutInMill
this.logSearchReadTimeoutInMilliseconds = logSearchReadTimeoutInMilliseconds;
}

@Override
public LogQueryResponse sendQueryRequest(Map<String, String> queryParameters) {
try {
// use the Apache builder to create the correct URI
Expand Down Expand Up @@ -302,6 +303,7 @@ private String getLogSearchAdminPassword() {
return null;
}

@Override
public HostLogFilesResponse sendGetLogFileNamesRequest(String hostName) {
try {
// use the Apache builder to create the correct URI
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ public String getHash() {
return hash;
}

@Override
public void setHash(String hash) {
this.hash = hash;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,12 @@ public UpdateEventType getEventType() {
return eventType;
}

@Override
public String getHash() {
return hash;
}

@Override
public void setHash(String hash) {
this.hash = hash;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ public boolean disableEndpointIdentification() {
return Boolean.valueOf(configValue(AmbariServerConfigurationKey.DISABLE_ENDPOINT_IDENTIFICATION));
}

@Override
public Map<String, String> toMap() {
return new HashMap<>(configurationMap);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -300,10 +300,12 @@ protected String getHostname() {
return hostName;
}

@Override
protected boolean isHostInMemoryAggregationEnabled() {
return false;
}

@Override
protected int getHostInMemoryAggregationPort() {
return 0;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ public String getType() {
* {@inheritDoc}
* Uses default Ambari OIDs
*/
@Override
protected PDU prepareTrap(Notification notification, SnmpVersion snmpVersion) throws InvalidSnmpConfigurationException {
AlertNotification alertNotification;
PDU pdu = DefaultPDUFactory.createPDU(snmpVersion.getTargetVersion());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -888,13 +888,15 @@ public void executeQuery(String query, boolean ignoreFailure) throws SQLExceptio
/**
{@inheritDoc}
*/
@Override
public void executePreparedQuery(String query, Object...arguments) throws SQLException {
executePreparedQuery(query, false, arguments);
}

/**
{@inheritDoc}
*/
@Override
public void executePreparedQuery(String query, boolean ignoreFailure, Object...arguments) throws SQLException{
LOG.info("Executing prepared query: {}", query);

Expand All @@ -920,13 +922,15 @@ public void executePreparedQuery(String query, boolean ignoreFailure, Object...a
/**
{@inheritDoc}
*/
@Override
public void executePreparedUpdate(String query, Object...arguments) throws SQLException {
executePreparedUpdate(query, false, arguments);
}

/**
{@inheritDoc}
*/
@Override
public void executePreparedUpdate(String query, boolean ignoreFailure, Object...arguments) throws SQLException{
LOG.info("Executing prepared query: {}", query);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ public void setVersion(String version) {
throw new RuntimeException("Version couldn't be null");
this.version = version;
}
@Override
public String getServiceName() {
return serviceName;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ public int removeByCategory(String categoryName) {
return query.executeUpdate();
}

@Override
@Transactional
public void create(AmbariConfigurationEntity entity) {
// make sure only one entry exists per configuration type...
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ public class BlueprintConfigEntity implements BlueprintConfiguration {
*
* @return configuration type
*/
@Override
public String getType() {
return type;
}
Expand All @@ -73,6 +74,7 @@ public String getType() {
*
* @param type configuration type
*/
@Override
public void setType(String type) {
this.type = type;
}
Expand Down Expand Up @@ -100,6 +102,7 @@ public void setBlueprintEntity(BlueprintEntity entity) {
*
* @return blueprint name
*/
@Override
public String getBlueprintName() {
return blueprintName;
}
Expand All @@ -109,6 +112,7 @@ public String getBlueprintName() {
* '
* @param blueprintName blueprint name
*/
@Override
public void setBlueprintName(String blueprintName) {
this.blueprintName = blueprintName;
}
Expand All @@ -118,6 +122,7 @@ public void setBlueprintName(String blueprintName) {
*
* @return config data in json format
*/
@Override
public String getConfigData() {
return configData;
}
Expand All @@ -127,6 +132,7 @@ public String getConfigData() {
*
* @param configData all config data in json format
*/
@Override
public void setConfigData(String configData) {
this.configData = configData;
}
Expand All @@ -136,6 +142,7 @@ public void setConfigData(String configData) {
*
* @return config attributes in JSON format
*/
@Override
public String getConfigAttributes() {
return configAttributes;
}
Expand All @@ -145,6 +152,7 @@ public String getConfigAttributes() {
*
* @param configAttributes all attribute values of configs in JSON format
*/
@Override
public void setConfigAttributes(String configAttributes) {
this.configAttributes = configAttributes;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ public class HostGroupConfigEntity implements BlueprintConfiguration {
*
* @return configuration type
*/
@Override
public String getType() {
return type;
}
Expand All @@ -83,6 +84,7 @@ public String getType() {
*
* @param type configuration type
*/
@Override
public void setType(String type) {
this.type = type;
}
Expand Down Expand Up @@ -110,6 +112,7 @@ public void setHostGroupEntity(HostGroupEntity entity) {
*
* @return blueprint name
*/
@Override
public String getBlueprintName() {
return blueprintName;
}
Expand All @@ -119,6 +122,7 @@ public String getBlueprintName() {
* '
* @param blueprintName blueprint name
*/
@Override
public void setBlueprintName(String blueprintName) {
this.blueprintName = blueprintName;
}
Expand Down Expand Up @@ -146,6 +150,7 @@ public void setHostGroupName(String hostGroupName) {
*
* @return config data in json format
*/
@Override
public String getConfigData() {
return configData;
}
Expand All @@ -155,6 +160,7 @@ public String getConfigData() {
*
* @param configData all config data in json format
*/
@Override
public void setConfigData(String configData) {
this.configData = configData;
}
Expand All @@ -164,6 +170,7 @@ public void setConfigData(String configData) {
*
* @return config attributes in JSON format
*/
@Override
public String getConfigAttributes() {
return configAttributes;
}
Expand All @@ -173,6 +180,7 @@ public String getConfigAttributes() {
*
* @param configAttributes all attribute values of configs in JSON format
*/
@Override
public void setConfigAttributes(String configAttributes) {
this.configAttributes = configAttributes;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ public void setUpdateTimestamp(long updateTimestamp) {
this.updateTimestamp = updateTimestamp;
}

@Override
public SettingEntity clone() {
SettingEntity cloned = new SettingEntity();
cloned.setId(id);
Expand Down
Loading

0 comments on commit 24dbed2

Please sign in to comment.