You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@knox.apache.org by kr...@apache.org on 2018/12/07 23:49:19 UTC
[06/10] knox git commit: KNOX-1663 - Enforce more Checkstyle rules
http://git-wip-us.apache.org/repos/asf/knox/blob/6736393d/gateway-spi/src/main/java/org/apache/knox/gateway/i18n/GatewaySpiMessages.java
----------------------------------------------------------------------
diff --git a/gateway-spi/src/main/java/org/apache/knox/gateway/i18n/GatewaySpiMessages.java b/gateway-spi/src/main/java/org/apache/knox/gateway/i18n/GatewaySpiMessages.java
index 2516f51..4270222 100644
--- a/gateway-spi/src/main/java/org/apache/knox/gateway/i18n/GatewaySpiMessages.java
+++ b/gateway-spi/src/main/java/org/apache/knox/gateway/i18n/GatewaySpiMessages.java
@@ -30,19 +30,19 @@ public interface GatewaySpiMessages {
@Message( level = MessageLevel.ERROR, text = "Failed to execute filter: {0}" )
void failedToExecuteFilter( @StackTrace( level = MessageLevel.DEBUG ) Throwable t );
-
+
@Message( level = MessageLevel.ERROR, text = "Failed to encrypt passphrase: {0}" )
void failedToEncryptPassphrase( @StackTrace( level = MessageLevel.DEBUG ) Exception e );
@Message( level = MessageLevel.ERROR, text = "Failed to generate secret key from password: {0}" )
void failedToGenerateKeyFromPassword( @StackTrace( level = MessageLevel.DEBUG ) Exception e );
-
+
@Message( level = MessageLevel.ERROR, text = "Failed to create keystore [filename={0}, type={1}]: {2}" )
void failedToCreateKeystore( String fileName, String keyStoreType, @StackTrace( level = MessageLevel.DEBUG ) Exception e );
-
+
@Message( level = MessageLevel.ERROR, text = "Failed to load keystore [filename={0}, type={1}]: {2}" )
void failedToLoadKeystore( String fileName, String keyStoreType, @StackTrace( level = MessageLevel.DEBUG ) Exception e );
-
+
@Message( level = MessageLevel.ERROR, text = "Failed to add credential: {1}" )
void failedToAddCredential( @StackTrace( level = MessageLevel.DEBUG ) Exception e );
@@ -51,7 +51,7 @@ public interface GatewaySpiMessages {
@Message( level = MessageLevel.ERROR, text = "Failed to get credential: {1}" )
void failedToGetCredential(@StackTrace( level = MessageLevel.DEBUG ) Exception e);
-
+
@Message( level = MessageLevel.ERROR, text = "Failed to persist master secret: {0}" )
void failedToPersistMasterSecret( @StackTrace( level = MessageLevel.DEBUG ) Exception e );
@@ -83,15 +83,15 @@ public interface GatewaySpiMessages {
void failedToGenerateCertificate( @StackTrace( level = MessageLevel.ERROR ) Exception e );
@Message(level = MessageLevel.ERROR, text = "Failed to read configuration: {0}")
- void failedToReadConfigurationFile(final String filePath, @StackTrace(level = MessageLevel.DEBUG) Exception e );
+ void failedToReadConfigurationFile(String filePath, @StackTrace(level = MessageLevel.DEBUG) Exception e );
@Message(level = MessageLevel.ERROR, text = "Invalid resource URI {0} : {1}")
- void invalidResourceURI(final String uri, final String reason, @StackTrace(level = MessageLevel.DEBUG) Exception e );
+ void invalidResourceURI(String uri, String reason, @StackTrace(level = MessageLevel.DEBUG) Exception e );
@Message(level = MessageLevel.ERROR, text = "Invalid resource name: {0}")
- void invalidResourceName(final String resourceName);
+ void invalidResourceName(String resourceName);
@Message( level = MessageLevel.ERROR, text = "Topology {0} cannot be manually overwritten because it was generated from a simple descriptor." )
- void disallowedOverwritingGeneratedTopology(final String topologyName);
+ void disallowedOverwritingGeneratedTopology(String topologyName);
}
http://git-wip-us.apache.org/repos/asf/knox/blob/6736393d/gateway-spi/src/main/java/org/apache/knox/gateway/i18n/GatewaySpiResources.java
----------------------------------------------------------------------
diff --git a/gateway-spi/src/main/java/org/apache/knox/gateway/i18n/GatewaySpiResources.java b/gateway-spi/src/main/java/org/apache/knox/gateway/i18n/GatewaySpiResources.java
index 0a05f81..1aa90e2 100644
--- a/gateway-spi/src/main/java/org/apache/knox/gateway/i18n/GatewaySpiResources.java
+++ b/gateway-spi/src/main/java/org/apache/knox/gateway/i18n/GatewaySpiResources.java
@@ -24,7 +24,7 @@ import org.apache.knox.gateway.i18n.resources.Resources;
public interface GatewaySpiResources {
@Resource(text = "Groups: {0}")
String groupsList( String groups );
-
+
@Resource(text = "Effective User: {0}")
String effectiveUser( String user );
}
http://git-wip-us.apache.org/repos/asf/knox/blob/6736393d/gateway-spi/src/main/java/org/apache/knox/gateway/security/GroupPrincipal.java
----------------------------------------------------------------------
diff --git a/gateway-spi/src/main/java/org/apache/knox/gateway/security/GroupPrincipal.java b/gateway-spi/src/main/java/org/apache/knox/gateway/security/GroupPrincipal.java
index 485356f..ba623ca 100644
--- a/gateway-spi/src/main/java/org/apache/knox/gateway/security/GroupPrincipal.java
+++ b/gateway-spi/src/main/java/org/apache/knox/gateway/security/GroupPrincipal.java
@@ -25,7 +25,7 @@ public class GroupPrincipal implements Principal {
public GroupPrincipal(String name) {
this.name = name;
}
-
+
@Override
public String getName() {
return name;
http://git-wip-us.apache.org/repos/asf/knox/blob/6736393d/gateway-spi/src/main/java/org/apache/knox/gateway/security/ImpersonatedPrincipal.java
----------------------------------------------------------------------
diff --git a/gateway-spi/src/main/java/org/apache/knox/gateway/security/ImpersonatedPrincipal.java b/gateway-spi/src/main/java/org/apache/knox/gateway/security/ImpersonatedPrincipal.java
index f9809e6..1e134b3 100644
--- a/gateway-spi/src/main/java/org/apache/knox/gateway/security/ImpersonatedPrincipal.java
+++ b/gateway-spi/src/main/java/org/apache/knox/gateway/security/ImpersonatedPrincipal.java
@@ -21,11 +21,11 @@ import java.security.Principal;
public class ImpersonatedPrincipal implements Principal {
private String name = null;
-
+
public ImpersonatedPrincipal(String name) {
this.name = name;
}
-
+
@Override
public String getName() {
return name;
http://git-wip-us.apache.org/repos/asf/knox/blob/6736393d/gateway-spi/src/main/java/org/apache/knox/gateway/security/PrimaryPrincipal.java
----------------------------------------------------------------------
diff --git a/gateway-spi/src/main/java/org/apache/knox/gateway/security/PrimaryPrincipal.java b/gateway-spi/src/main/java/org/apache/knox/gateway/security/PrimaryPrincipal.java
index cfa6518..59ed99e 100644
--- a/gateway-spi/src/main/java/org/apache/knox/gateway/security/PrimaryPrincipal.java
+++ b/gateway-spi/src/main/java/org/apache/knox/gateway/security/PrimaryPrincipal.java
@@ -25,7 +25,7 @@ public class PrimaryPrincipal implements Principal {
public PrimaryPrincipal(String name) {
this.name = name;
}
-
+
@Override
public String getName() {
return name;
http://git-wip-us.apache.org/repos/asf/knox/blob/6736393d/gateway-spi/src/main/java/org/apache/knox/gateway/security/SubjectUtils.java
----------------------------------------------------------------------
diff --git a/gateway-spi/src/main/java/org/apache/knox/gateway/security/SubjectUtils.java b/gateway-spi/src/main/java/org/apache/knox/gateway/security/SubjectUtils.java
index 71340c0..aac20af 100644
--- a/gateway-spi/src/main/java/org/apache/knox/gateway/security/SubjectUtils.java
+++ b/gateway-spi/src/main/java/org/apache/knox/gateway/security/SubjectUtils.java
@@ -26,7 +26,6 @@ import java.util.Set;
* General utility methods for interrogating the standard java Subject
*/
public class SubjectUtils {
-
public static Subject getCurrentSubject() {
return Subject.getSubject( AccessController.getContext() );
}
@@ -47,16 +46,12 @@ public class SubjectUtils {
name = p.getName();
break;
}
-
+
return name;
}
-
+
public static boolean isImpersonating(Subject subject) {
- boolean impersonating = false;
-
- impersonating = (subject.getPrincipals(ImpersonatedPrincipal.class).size() > 0);
-
- return impersonating;
+ return (subject.getPrincipals(ImpersonatedPrincipal.class).size() > 0);
}
public static String getImpersonatedPrincipalName(Subject subject) {
@@ -66,18 +61,16 @@ public class SubjectUtils {
if (!impPrincipals.isEmpty()) {
return ((Principal)impPrincipals.toArray()[0]).getName();
}
-
+
return name;
}
-
+
public static String getEffectivePrincipalName(Subject subject) {
- String name = null;
-
- name = getImpersonatedPrincipalName(subject);
+ String name = getImpersonatedPrincipalName(subject);
if (name == null) {
name = getPrimaryPrincipalName(subject);
}
-
+
return name;
}
http://git-wip-us.apache.org/repos/asf/knox/blob/6736393d/gateway-spi/src/main/java/org/apache/knox/gateway/security/principal/SimplePrincipalMapper.java
----------------------------------------------------------------------
diff --git a/gateway-spi/src/main/java/org/apache/knox/gateway/security/principal/SimplePrincipalMapper.java b/gateway-spi/src/main/java/org/apache/knox/gateway/security/principal/SimplePrincipalMapper.java
index 753cb08..fc7db6c 100644
--- a/gateway-spi/src/main/java/org/apache/knox/gateway/security/principal/SimplePrincipalMapper.java
+++ b/gateway-spi/src/main/java/org/apache/knox/gateway/security/principal/SimplePrincipalMapper.java
@@ -75,7 +75,6 @@ public class SimplePrincipalMapper implements PrincipalMapper {
if (p == null) {
return principalName;
}
-
return p[0];
}
@@ -83,18 +82,17 @@ public class SimplePrincipalMapper implements PrincipalMapper {
public String[] mapGroupPrincipal(String principalName) {
String[] groups = null;
String[] wildCardGroups = null;
-
+
if (groupMappings != null) {
groups = groupMappings.get(principalName);
wildCardGroups = groupMappings.get("*");
if (groups != null && wildCardGroups != null) {
- groups = concat(groups, wildCardGroups);
+ groups = concat(groups, wildCardGroups);
}
else if (wildCardGroups != null) {
return wildCardGroups;
}
}
-
return groups;
}
http://git-wip-us.apache.org/repos/asf/knox/blob/6736393d/gateway-spi/src/main/java/org/apache/knox/gateway/services/GatewayServices.java
----------------------------------------------------------------------
diff --git a/gateway-spi/src/main/java/org/apache/knox/gateway/services/GatewayServices.java b/gateway-spi/src/main/java/org/apache/knox/gateway/services/GatewayServices.java
index 8fa2236..db512a0 100644
--- a/gateway-spi/src/main/java/org/apache/knox/gateway/services/GatewayServices.java
+++ b/gateway-spi/src/main/java/org/apache/knox/gateway/services/GatewayServices.java
@@ -24,27 +24,26 @@ import org.apache.knox.gateway.deploy.ProviderDeploymentContributor;
public interface GatewayServices extends Service,
ProviderDeploymentContributor {
- public static final String GATEWAY_CLUSTER_ATTRIBUTE = "org.apache.knox.gateway.gateway.cluster";
- public static final String GATEWAY_SERVICES_ATTRIBUTE = "org.apache.knox.gateway.gateway.services";
-
- public static final String SSL_SERVICE = "SSLService";
- public static final String CRYPTO_SERVICE = "CryptoService";
- public static final String ALIAS_SERVICE = "AliasService";
- public static final String KEYSTORE_SERVICE = "KeystoreService";
- public static final String TOKEN_SERVICE = "TokenService";
- public static final String SERVICE_REGISTRY_SERVICE = "ServiceRegistryService";
- public static final String HOST_MAPPING_SERVICE = "HostMappingService";
- public static final String SERVER_INFO_SERVICE = "ServerInfoService";
- public static final String TOPOLOGY_SERVICE = "TopologyService";
- public static final String SERVICE_DEFINITION_REGISTRY = "ServiceDefinitionRegistry";
- public static final String METRICS_SERVICE = "MetricsService";
+ String GATEWAY_CLUSTER_ATTRIBUTE = "org.apache.knox.gateway.gateway.cluster";
+ String GATEWAY_SERVICES_ATTRIBUTE = "org.apache.knox.gateway.gateway.services";
+
+ String SSL_SERVICE = "SSLService";
+ String CRYPTO_SERVICE = "CryptoService";
+ String ALIAS_SERVICE = "AliasService";
+ String KEYSTORE_SERVICE = "KeystoreService";
+ String TOKEN_SERVICE = "TokenService";
+ String SERVICE_REGISTRY_SERVICE = "ServiceRegistryService";
+ String HOST_MAPPING_SERVICE = "HostMappingService";
+ String SERVER_INFO_SERVICE = "ServerInfoService";
+ String TOPOLOGY_SERVICE = "TopologyService";
+ String SERVICE_DEFINITION_REGISTRY = "ServiceDefinitionRegistry";
+ String METRICS_SERVICE = "MetricsService";
String REMOTE_REGISTRY_CLIENT_SERVICE = "RemoteConfigRegistryClientService";
String CLUSTER_CONFIGURATION_MONITOR_SERVICE = "ClusterConfigurationMonitorService";
- public abstract Collection<String> getServiceNames();
-
- public abstract <T> T getService( String serviceName );
+ Collection<String> getServiceNames();
+ <T> T getService( String serviceName );
}
http://git-wip-us.apache.org/repos/asf/knox/blob/6736393d/gateway-spi/src/main/java/org/apache/knox/gateway/services/ServerInfoService.java
----------------------------------------------------------------------
diff --git a/gateway-spi/src/main/java/org/apache/knox/gateway/services/ServerInfoService.java b/gateway-spi/src/main/java/org/apache/knox/gateway/services/ServerInfoService.java
index 2cb2f01..a9b3301 100644
--- a/gateway-spi/src/main/java/org/apache/knox/gateway/services/ServerInfoService.java
+++ b/gateway-spi/src/main/java/org/apache/knox/gateway/services/ServerInfoService.java
@@ -27,7 +27,7 @@ public interface ServerInfoService extends Service {
* @return build version
*/
String getBuildVersion();
-
+
/**
* Get the build hash for the server instance
* @return build hash
http://git-wip-us.apache.org/repos/asf/knox/blob/6736393d/gateway-spi/src/main/java/org/apache/knox/gateway/services/Service.java
----------------------------------------------------------------------
diff --git a/gateway-spi/src/main/java/org/apache/knox/gateway/services/Service.java b/gateway-spi/src/main/java/org/apache/knox/gateway/services/Service.java
index 63a9baa..8e2f002 100644
--- a/gateway-spi/src/main/java/org/apache/knox/gateway/services/Service.java
+++ b/gateway-spi/src/main/java/org/apache/knox/gateway/services/Service.java
@@ -23,8 +23,8 @@ import org.apache.knox.gateway.config.GatewayConfig;
public interface Service {
void init(GatewayConfig config, Map<String,String> options) throws ServiceLifecycleException;
-
+
void start() throws ServiceLifecycleException;
-
+
void stop() throws ServiceLifecycleException;
}
http://git-wip-us.apache.org/repos/asf/knox/blob/6736393d/gateway-spi/src/main/java/org/apache/knox/gateway/services/hostmap/HostMapper.java
----------------------------------------------------------------------
diff --git a/gateway-spi/src/main/java/org/apache/knox/gateway/services/hostmap/HostMapper.java b/gateway-spi/src/main/java/org/apache/knox/gateway/services/hostmap/HostMapper.java
index 9c008d0..90cd791 100644
--- a/gateway-spi/src/main/java/org/apache/knox/gateway/services/hostmap/HostMapper.java
+++ b/gateway-spi/src/main/java/org/apache/knox/gateway/services/hostmap/HostMapper.java
@@ -18,8 +18,7 @@
package org.apache.knox.gateway.services.hostmap;
public interface HostMapper {
- public abstract String resolveInboundHostName( String inboundHost );
-
- public abstract String resolveOutboundHostName( String outboundHost );
+ String resolveInboundHostName( String inboundHost );
+ String resolveOutboundHostName( String outboundHost );
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/knox/blob/6736393d/gateway-spi/src/main/java/org/apache/knox/gateway/services/registry/ServiceRegistry.java
----------------------------------------------------------------------
diff --git a/gateway-spi/src/main/java/org/apache/knox/gateway/services/registry/ServiceRegistry.java b/gateway-spi/src/main/java/org/apache/knox/gateway/services/registry/ServiceRegistry.java
index d851767..aef6168 100644
--- a/gateway-spi/src/main/java/org/apache/knox/gateway/services/registry/ServiceRegistry.java
+++ b/gateway-spi/src/main/java/org/apache/knox/gateway/services/registry/ServiceRegistry.java
@@ -20,15 +20,13 @@ package org.apache.knox.gateway.services.registry;
import java.util.List;
public interface ServiceRegistry {
-
String getRegistrationCode(String clusterName);
-
+
boolean registerService(String regCode, String clusterName, String serviceName, List<String> urls);
-
+
String lookupServiceURL(String clusterName, String serviceName);
List<String> lookupServiceURLs( String clusterName, String serviceName );
-
- void removeClusterServices(String clusterName);
+ void removeClusterServices(String clusterName);
}
http://git-wip-us.apache.org/repos/asf/knox/blob/6736393d/gateway-spi/src/main/java/org/apache/knox/gateway/services/security/CryptoService.java
----------------------------------------------------------------------
diff --git a/gateway-spi/src/main/java/org/apache/knox/gateway/services/security/CryptoService.java b/gateway-spi/src/main/java/org/apache/knox/gateway/services/security/CryptoService.java
index 5e0a7d4..e2ccd2a 100644
--- a/gateway-spi/src/main/java/org/apache/knox/gateway/services/security/CryptoService.java
+++ b/gateway-spi/src/main/java/org/apache/knox/gateway/services/security/CryptoService.java
@@ -20,16 +20,15 @@ package org.apache.knox.gateway.services.security;
import org.apache.knox.gateway.services.Service;
public interface CryptoService extends Service {
-
- public void createAndStoreEncryptionKeyForCluster(String clusterName, String alias);
-
- public EncryptionResult encryptForCluster(String clusterName, String alias, byte[] clear);
+ void createAndStoreEncryptionKeyForCluster(String clusterName, String alias);
- public byte[] decryptForCluster(String clusterName, String alias, String cipherText);
+ EncryptionResult encryptForCluster(String clusterName, String alias, byte[] clear);
- public byte[] decryptForCluster(String clusterName, String alias, byte[] cipherText, byte[] iv, byte[] salt);
+ byte[] decryptForCluster(String clusterName, String alias, String cipherText);
- public boolean verify(String algorithm, String alias, String payloadToSign, byte[] signaturePayload);
+ byte[] decryptForCluster(String clusterName, String alias, byte[] cipherText, byte[] iv, byte[] salt);
- public byte[] sign(String algorithm, String alias, String payloadToSign);
+ boolean verify(String algorithm, String alias, String payloadToSign, byte[] signaturePayload);
+
+ byte[] sign(String algorithm, String alias, String payloadToSign);
}
http://git-wip-us.apache.org/repos/asf/knox/blob/6736393d/gateway-spi/src/main/java/org/apache/knox/gateway/services/security/EncryptionResult.java
----------------------------------------------------------------------
diff --git a/gateway-spi/src/main/java/org/apache/knox/gateway/services/security/EncryptionResult.java b/gateway-spi/src/main/java/org/apache/knox/gateway/services/security/EncryptionResult.java
index b2db1c4..3d3ccf4 100644
--- a/gateway-spi/src/main/java/org/apache/knox/gateway/services/security/EncryptionResult.java
+++ b/gateway-spi/src/main/java/org/apache/knox/gateway/services/security/EncryptionResult.java
@@ -23,17 +23,16 @@ public class EncryptionResult {
public byte[] salt;
public byte[] iv;
public byte[] cipher;
-
+
public EncryptionResult() {
-
}
-
+
public EncryptionResult(byte[] salt, byte[] iv, byte[] cipher) {
this.salt = salt;
this.iv = iv;
this.cipher = cipher;
}
-
+
public byte[] toByteAray() {
int headerLength = 12;
ByteBuffer bb = ByteBuffer.allocate(salt.length + iv.length + cipher.length + headerLength);
@@ -44,15 +43,15 @@ public class EncryptionResult {
.put(iv)
.put(cipher);
bb.flip();
-
+
return bb.array();
}
-
+
public static EncryptionResult fromByteArray(byte[] array) {
EncryptionResult result = new EncryptionResult();
-
+
ByteBuffer bb = ByteBuffer.wrap(array);
-
+
int saltSize = bb.getInt();
int ivSize = bb.getInt();
int cipherSize = bb.getInt();
@@ -60,11 +59,11 @@ public class EncryptionResult {
result.salt = new byte[saltSize];
result.iv = new byte[ivSize];
result.cipher = new byte[cipherSize];
-
+
bb.get(result.salt);
bb.get(result.iv);
bb.get(result.cipher);
-
+
return result;
}
}
http://git-wip-us.apache.org/repos/asf/knox/blob/6736393d/gateway-spi/src/main/java/org/apache/knox/gateway/services/security/KeystoreService.java
----------------------------------------------------------------------
diff --git a/gateway-spi/src/main/java/org/apache/knox/gateway/services/security/KeystoreService.java b/gateway-spi/src/main/java/org/apache/knox/gateway/services/security/KeystoreService.java
index 0467565..5c21d90 100644
--- a/gateway-spi/src/main/java/org/apache/knox/gateway/services/security/KeystoreService.java
+++ b/gateway-spi/src/main/java/org/apache/knox/gateway/services/security/KeystoreService.java
@@ -25,7 +25,7 @@ public interface KeystoreService {
void createKeystoreForGateway() throws KeystoreServiceException;
void addSelfSignedCertForGateway(String alias, char[] passphrase) throws KeystoreServiceException;
-
+
void addSelfSignedCertForGateway(String alias, char[] passphrase, String hostname) throws KeystoreServiceException;
KeyStore getKeystoreForGateway() throws KeystoreServiceException;
http://git-wip-us.apache.org/repos/asf/knox/blob/6736393d/gateway-spi/src/main/java/org/apache/knox/gateway/services/security/MasterService.java
----------------------------------------------------------------------
diff --git a/gateway-spi/src/main/java/org/apache/knox/gateway/services/security/MasterService.java b/gateway-spi/src/main/java/org/apache/knox/gateway/services/security/MasterService.java
index 99faad8..6c028ea 100644
--- a/gateway-spi/src/main/java/org/apache/knox/gateway/services/security/MasterService.java
+++ b/gateway-spi/src/main/java/org/apache/knox/gateway/services/security/MasterService.java
@@ -18,5 +18,5 @@
package org.apache.knox.gateway.services.security;
public interface MasterService {
- public abstract char[] getMasterSecret();
+ char[] getMasterSecret();
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/knox/blob/6736393d/gateway-spi/src/main/java/org/apache/knox/gateway/services/security/impl/BaseKeystoreService.java
----------------------------------------------------------------------
diff --git a/gateway-spi/src/main/java/org/apache/knox/gateway/services/security/impl/BaseKeystoreService.java b/gateway-spi/src/main/java/org/apache/knox/gateway/services/security/impl/BaseKeystoreService.java
index 720e4c3..1f5ba58 100644
--- a/gateway-spi/src/main/java/org/apache/knox/gateway/services/security/impl/BaseKeystoreService.java
+++ b/gateway-spi/src/main/java/org/apache/knox/gateway/services/security/impl/BaseKeystoreService.java
@@ -47,9 +47,7 @@ public class BaseKeystoreService {
protected String keyStoreDir;
private static KeyStore loadKeyStore(final File keyStoreFile, final char[] masterPassword, String storeType)
- throws CertificateException, IOException, KeyStoreException,
- NoSuchAlgorithmException {
-
+ throws CertificateException, IOException, KeyStoreException, NoSuchAlgorithmException {
final KeyStore keyStore = KeyStore.getInstance(storeType);
if ( keyStoreFile.exists() ) {
try (FileInputStream input = new FileInputStream( keyStoreFile )) {
@@ -58,7 +56,7 @@ public class BaseKeystoreService {
} else {
keyStore.load( null, masterPassword );
}
-
+
return keyStore;
}
@@ -83,8 +81,8 @@ public class BaseKeystoreService {
protected void createKeystore(String filename, String keystoreType) throws KeystoreServiceException {
try (FileOutputStream out = createKeyStoreFile( filename )) {
- KeyStore ks = KeyStore.getInstance(keystoreType);
- ks.load( null, null );
+ KeyStore ks = KeyStore.getInstance(keystoreType);
+ ks.load( null, null );
ks.store( out, masterService.getMasterSecret() );
} catch (KeyStoreException e) {
LOG.failedToCreateKeystore( filename, keystoreType, e );
@@ -185,7 +183,7 @@ public class BaseKeystoreService {
protected void writeCertificateToFile( Certificate cert, final File file ) throws CertificateEncodingException, IOException {
byte[] bytes = cert.getEncoded();
Base64 encoder = new Base64( 76, "\n".getBytes( StandardCharsets.US_ASCII ) );
- try( final FileOutputStream out = new FileOutputStream( file ) ) {
+ try( FileOutputStream out = new FileOutputStream( file ) ) {
out.write( "-----BEGIN CERTIFICATE-----\n".getBytes( StandardCharsets.US_ASCII ) );
out.write( encoder.encodeToString( bytes ).getBytes( StandardCharsets.US_ASCII ) );
out.write( "-----END CERTIFICATE-----\n".getBytes( StandardCharsets.US_ASCII ) );
@@ -195,7 +193,7 @@ public class BaseKeystoreService {
protected void writeKeystoreToFile(final KeyStore keyStore, final File file)
throws KeyStoreException, IOException, NoSuchAlgorithmException, CertificateException {
// TODO: backup the keystore on disk before attempting a write and restore on failure
- try( final FileOutputStream out = new FileOutputStream(file) ) {
+ try( FileOutputStream out = new FileOutputStream(file) ) {
keyStore.store( out, masterService.getMasterSecret() );
}
}
http://git-wip-us.apache.org/repos/asf/knox/blob/6736393d/gateway-spi/src/main/java/org/apache/knox/gateway/services/security/impl/CMFKeystoreService.java
----------------------------------------------------------------------
diff --git a/gateway-spi/src/main/java/org/apache/knox/gateway/services/security/impl/CMFKeystoreService.java b/gateway-spi/src/main/java/org/apache/knox/gateway/services/security/impl/CMFKeystoreService.java
index 623314e..0e4c9ab 100644
--- a/gateway-spi/src/main/java/org/apache/knox/gateway/services/security/impl/CMFKeystoreService.java
+++ b/gateway-spi/src/main/java/org/apache/knox/gateway/services/security/impl/CMFKeystoreService.java
@@ -42,7 +42,7 @@ public class CMFKeystoreService extends BaseKeystoreService {
private static final String CREDENTIALS_SUFFIX = "-credentials.jceks";
private String serviceName = null;
-
+
public CMFKeystoreService(String keystoreDir, String serviceName)
throws ServiceLifecycleException {
this.serviceName = serviceName;
@@ -62,21 +62,21 @@ public class CMFKeystoreService extends BaseKeystoreService {
final File keyStoreFile = new File( keyStoreDir + serviceName );
return getKeystore(keyStoreFile, "JKS");
}
-
+
public void addSelfSignedCert(String alias, char[] passphrase)
throws KeystoreServiceException {
KeyPairGenerator keyPairGenerator;
try {
keyPairGenerator = KeyPairGenerator.getInstance("RSA");
- keyPairGenerator.initialize(1024);
+ keyPairGenerator.initialize(1024);
KeyPair KPair = keyPairGenerator.generateKeyPair();
X509Certificate cert = X509CertificateUtil.generateCertificate(TEST_CERT_DN, KPair, 365, "SHA1withRSA");
KeyStore privateKS = getKeystore();
if (privateKS != null) {
- privateKS.setKeyEntry(alias, KPair.getPrivate(),
- passphrase,
- new java.security.cert.Certificate[]{cert});
+ privateKS.setKeyEntry(alias, KPair.getPrivate(),
+ passphrase,
+ new java.security.cert.Certificate[]{cert});
writeKeystoreToFile(privateKS, new File( keyStoreDir + serviceName ));
} else {
throw new IOException("Unable to open gateway keystore.");
@@ -85,7 +85,7 @@ public class CMFKeystoreService extends BaseKeystoreService {
LOG.failedToAddSeflSignedCertForGateway(alias, e);
}
}
-
+
public void createCredentialStore() throws KeystoreServiceException {
String filename = keyStoreDir + serviceName + CREDENTIALS_SUFFIX;
createKeystore(filename, "JCEKS");
@@ -120,8 +120,8 @@ public class CMFKeystoreService extends BaseKeystoreService {
}
}
return key;
- }
-
+ }
+
public KeyStore getCredentialStore() throws KeystoreServiceException {
final File keyStoreFile = new File( keyStoreDir + serviceName + CREDENTIALS_SUFFIX );
return getKeystore(keyStoreFile, "JCEKS");
http://git-wip-us.apache.org/repos/asf/knox/blob/6736393d/gateway-spi/src/main/java/org/apache/knox/gateway/services/security/impl/CMFMasterService.java
----------------------------------------------------------------------
diff --git a/gateway-spi/src/main/java/org/apache/knox/gateway/services/security/impl/CMFMasterService.java b/gateway-spi/src/main/java/org/apache/knox/gateway/services/security/impl/CMFMasterService.java
index 6552dcc..4996030 100644
--- a/gateway-spi/src/main/java/org/apache/knox/gateway/services/security/impl/CMFMasterService.java
+++ b/gateway-spi/src/main/java/org/apache/knox/gateway/services/security/impl/CMFMasterService.java
@@ -136,14 +136,14 @@ public class CMFMasterService {
try {
ArrayList<String> lines = new ArrayList<>();
lines.add(MASTER_PERSISTENCE_TAG);
-
+
String line = Base64.encodeBase64String((
- Base64.encodeBase64String(atom.salt) + "::" +
- Base64.encodeBase64String(atom.iv) + "::" +
+ Base64.encodeBase64String(atom.salt) + "::" +
+ Base64.encodeBase64String(atom.iv) + "::" +
Base64.encodeBase64String(atom.cipher)).getBytes(StandardCharsets.UTF_8));
lines.add(line);
FileUtils.writeLines(masterFile, StandardCharsets.UTF_8.name(), lines);
-
+
// restrict os permissions to only the user running this process
chmod("600", masterFile);
} catch (IOException e) {
@@ -184,11 +184,11 @@ public class CMFMasterService {
// TODO: look into the following for Windows: Runtime.getRuntime().exec("attrib -r myFile");
if (isUnixEnv()) {
//args and file should never be null.
- if (args == null || file == null)
+ if (args == null || file == null)
throw new IllegalArgumentException("nullArg");
- if (!file.exists())
+ if (!file.exists())
throw new IOException("fileNotFound");
-
+
// " +" regular expression for 1 or more spaces
final String[] argsString = args.split(" +");
List<String> cmdList = new ArrayList<>();
http://git-wip-us.apache.org/repos/asf/knox/blob/6736393d/gateway-spi/src/main/java/org/apache/knox/gateway/services/security/impl/ConfigurableEncryptor.java
----------------------------------------------------------------------
diff --git a/gateway-spi/src/main/java/org/apache/knox/gateway/services/security/impl/ConfigurableEncryptor.java b/gateway-spi/src/main/java/org/apache/knox/gateway/services/security/impl/ConfigurableEncryptor.java
index e29b1e5..f3361d8 100644
--- a/gateway-spi/src/main/java/org/apache/knox/gateway/services/security/impl/ConfigurableEncryptor.java
+++ b/gateway-spi/src/main/java/org/apache/knox/gateway/services/security/impl/ConfigurableEncryptor.java
@@ -37,10 +37,10 @@ import org.apache.knox.gateway.services.security.EncryptionResult;
public class ConfigurableEncryptor {
private static final GatewaySpiMessages LOG = MessagesFactory.get( GatewaySpiMessages.class );
-
+
private static final int ITERATION_COUNT = 65536;
private static final int KEY_LENGTH = 128;
-
+
private char[] passPhrase = null;
private String alg = "AES";
private String pbeAlg = "PBKDF2WithHmacSHA1";
@@ -48,7 +48,7 @@ public class ConfigurableEncryptor {
private int saltSize = 8;
private int iterationCount = ITERATION_COUNT;
private int keyLength = KEY_LENGTH;
-
+
public ConfigurableEncryptor(String passPhrase) {
this.passPhrase = passPhrase.toCharArray();
}
@@ -94,7 +94,7 @@ public class ConfigurableEncryptor {
} catch (InvalidKeySpecException e) {
LOG.failedToGenerateKeyFromPassword( e );
}
-
+
return key;
}
@@ -121,7 +121,7 @@ public class ConfigurableEncryptor {
public byte[] decrypt(byte[] salt, byte[] iv, byte[] encrypt) throws Exception {
SecretKey tmp = getKeyFromPassword(new String(passPhrase), salt);
SecretKey secret = new SecretKeySpec(tmp.getEncoded(), alg);
-
+
Cipher dcipher = Cipher.getInstance(transformation);
dcipher.init(Cipher.DECRYPT_MODE, secret, new IvParameterSpec(iv));
return dcipher.doFinal(encrypt);
http://git-wip-us.apache.org/repos/asf/knox/blob/6736393d/gateway-spi/src/main/java/org/apache/knox/gateway/services/security/impl/X509CertificateUtil.java
----------------------------------------------------------------------
diff --git a/gateway-spi/src/main/java/org/apache/knox/gateway/services/security/impl/X509CertificateUtil.java b/gateway-spi/src/main/java/org/apache/knox/gateway/services/security/impl/X509CertificateUtil.java
index 1cce280..551fb5c 100644
--- a/gateway-spi/src/main/java/org/apache/knox/gateway/services/security/impl/X509CertificateUtil.java
+++ b/gateway-spi/src/main/java/org/apache/knox/gateway/services/security/impl/X509CertificateUtil.java
@@ -276,7 +276,7 @@ public class X509CertificateUtil {
throws CertificateEncodingException, IOException {
byte[] bytes = cert.getEncoded();
Base64 encoder = new Base64( 76, "\n".getBytes( StandardCharsets.US_ASCII ) );
- try( final FileOutputStream out = new FileOutputStream( file ) ) {
+ try( FileOutputStream out = new FileOutputStream( file ) ) {
out.write( "-----BEGIN CERTIFICATE-----\n".getBytes( StandardCharsets.US_ASCII ) );
out.write( encoder.encodeToString( bytes ).getBytes( StandardCharsets.US_ASCII ) );
out.write( "-----END CERTIFICATE-----\n".getBytes( StandardCharsets.US_ASCII ) );
http://git-wip-us.apache.org/repos/asf/knox/blob/6736393d/gateway-spi/src/main/java/org/apache/knox/gateway/services/security/token/impl/JWT.java
----------------------------------------------------------------------
diff --git a/gateway-spi/src/main/java/org/apache/knox/gateway/services/security/token/impl/JWT.java b/gateway-spi/src/main/java/org/apache/knox/gateway/services/security/token/impl/JWT.java
index 445f51c..984f515 100644
--- a/gateway-spi/src/main/java/org/apache/knox/gateway/services/security/token/impl/JWT.java
+++ b/gateway-spi/src/main/java/org/apache/knox/gateway/services/security/token/impl/JWT.java
@@ -45,7 +45,7 @@ public interface JWT {
String getAudience();
- public String[] getAudienceClaims();
+ String[] getAudienceClaims();
String getExpires();
http://git-wip-us.apache.org/repos/asf/knox/blob/6736393d/gateway-spi/src/main/java/org/apache/knox/gateway/topology/Param.java
----------------------------------------------------------------------
diff --git a/gateway-spi/src/main/java/org/apache/knox/gateway/topology/Param.java b/gateway-spi/src/main/java/org/apache/knox/gateway/topology/Param.java
index e42e76c..1a15cf3 100644
--- a/gateway-spi/src/main/java/org/apache/knox/gateway/topology/Param.java
+++ b/gateway-spi/src/main/java/org/apache/knox/gateway/topology/Param.java
@@ -45,6 +45,4 @@ public class Param {
public void setValue(String value) {
this.value = value;
}
-
-
}
http://git-wip-us.apache.org/repos/asf/knox/blob/6736393d/gateway-spi/src/main/java/org/apache/knox/gateway/topology/Provider.java
----------------------------------------------------------------------
diff --git a/gateway-spi/src/main/java/org/apache/knox/gateway/topology/Provider.java b/gateway-spi/src/main/java/org/apache/knox/gateway/topology/Provider.java
index a031bec..0e20ae8 100644
--- a/gateway-spi/src/main/java/org/apache/knox/gateway/topology/Provider.java
+++ b/gateway-spi/src/main/java/org/apache/knox/gateway/topology/Provider.java
@@ -31,7 +31,7 @@ public class Provider {
public Provider() {
}
-
+
public String getName() {
return name;
}
http://git-wip-us.apache.org/repos/asf/knox/blob/6736393d/gateway-spi/src/main/java/org/apache/knox/gateway/topology/Service.java
----------------------------------------------------------------------
diff --git a/gateway-spi/src/main/java/org/apache/knox/gateway/topology/Service.java b/gateway-spi/src/main/java/org/apache/knox/gateway/topology/Service.java
index bff840f..6b0c5de 100644
--- a/gateway-spi/src/main/java/org/apache/knox/gateway/topology/Service.java
+++ b/gateway-spi/src/main/java/org/apache/knox/gateway/topology/Service.java
@@ -136,7 +136,7 @@ public class Service {
}
return true;
}
-
+
@Override
public int hashCode() {
int hashCode = 17;
http://git-wip-us.apache.org/repos/asf/knox/blob/6736393d/gateway-spi/src/main/java/org/apache/knox/gateway/topology/Topology.java
----------------------------------------------------------------------
diff --git a/gateway-spi/src/main/java/org/apache/knox/gateway/topology/Topology.java b/gateway-spi/src/main/java/org/apache/knox/gateway/topology/Topology.java
index ddf8575..c84673f 100644
--- a/gateway-spi/src/main/java/org/apache/knox/gateway/topology/Topology.java
+++ b/gateway-spi/src/main/java/org/apache/knox/gateway/topology/Topology.java
@@ -137,7 +137,7 @@ public class Topology {
public Provider getProvider( String role, String name ) {
Provider provider = null;
Map<String,Provider> nameMap = providerMap.get( role );
- if( nameMap != null) {
+ if( nameMap != null) {
if( name != null ) {
provider = nameMap.get( name );
}
http://git-wip-us.apache.org/repos/asf/knox/blob/6736393d/gateway-spi/src/test/java/org/apache/knox/gateway/dispatch/CappedBufferHttpEntityTest.java
----------------------------------------------------------------------
diff --git a/gateway-spi/src/test/java/org/apache/knox/gateway/dispatch/CappedBufferHttpEntityTest.java b/gateway-spi/src/test/java/org/apache/knox/gateway/dispatch/CappedBufferHttpEntityTest.java
index 702b73a..be5ff41 100644
--- a/gateway-spi/src/test/java/org/apache/knox/gateway/dispatch/CappedBufferHttpEntityTest.java
+++ b/gateway-spi/src/test/java/org/apache/knox/gateway/dispatch/CappedBufferHttpEntityTest.java
@@ -190,7 +190,6 @@ public class CappedBufferHttpEntityTest {
} catch( IOException e ) {
// Expected.
}
-
}
@Test
@@ -555,7 +554,7 @@ public class CappedBufferHttpEntityTest {
replay = new CappedBufferHttpEntity( basic, 5 );
stream = replay.getContent();
- try {
+ try {
text = blockRead( stream, StandardCharsets.UTF_8, 7, 2 );
fail( "Expected IOException" );
} catch ( IOException e ) {
@@ -658,7 +657,6 @@ public class CappedBufferHttpEntityTest {
} catch (IOException e) {
// expected
}
-
}
@Test
http://git-wip-us.apache.org/repos/asf/knox/blob/6736393d/gateway-spi/src/test/java/org/apache/knox/gateway/security/principal/PrincipalMapperTest.java
----------------------------------------------------------------------
diff --git a/gateway-spi/src/test/java/org/apache/knox/gateway/security/principal/PrincipalMapperTest.java b/gateway-spi/src/test/java/org/apache/knox/gateway/security/principal/PrincipalMapperTest.java
index a4aed1c..066d546 100644
--- a/gateway-spi/src/test/java/org/apache/knox/gateway/security/principal/PrincipalMapperTest.java
+++ b/gateway-spi/src/test/java/org/apache/knox/gateway/security/principal/PrincipalMapperTest.java
@@ -55,7 +55,7 @@ public class PrincipalMapperTest {
assertEquals("users", mapper.mapGroupPrincipal("hdfs")[0]);
assertEquals("users", mapper.mapGroupPrincipal("lmccay")[0]);
}
-
+
@Test
public void testSimplePrincipalMappingWithWildcardAndExplicitGroups() {
String principalMapping = "";
http://git-wip-us.apache.org/repos/asf/knox/blob/6736393d/gateway-spi/src/test/java/org/apache/knox/gateway/services/security/impl/CMFMasterServiceTest.java
----------------------------------------------------------------------
diff --git a/gateway-spi/src/test/java/org/apache/knox/gateway/services/security/impl/CMFMasterServiceTest.java b/gateway-spi/src/test/java/org/apache/knox/gateway/services/security/impl/CMFMasterServiceTest.java
index bd17ceb..82170ed 100644
--- a/gateway-spi/src/test/java/org/apache/knox/gateway/services/security/impl/CMFMasterServiceTest.java
+++ b/gateway-spi/src/test/java/org/apache/knox/gateway/services/security/impl/CMFMasterServiceTest.java
@@ -41,7 +41,7 @@ public class CMFMasterServiceTest {
public void setup() {
ms = new TestCMFMasterService("ambari");
}
-
+
@Test
public void testMasterService() {
try {
http://git-wip-us.apache.org/repos/asf/knox/blob/6736393d/gateway-spi/src/test/java/org/apache/knox/gateway/services/security/impl/TestCMFMasterService.java
----------------------------------------------------------------------
diff --git a/gateway-spi/src/test/java/org/apache/knox/gateway/services/security/impl/TestCMFMasterService.java b/gateway-spi/src/test/java/org/apache/knox/gateway/services/security/impl/TestCMFMasterService.java
index 2d0cd24..03c81b6 100644
--- a/gateway-spi/src/test/java/org/apache/knox/gateway/services/security/impl/TestCMFMasterService.java
+++ b/gateway-spi/src/test/java/org/apache/knox/gateway/services/security/impl/TestCMFMasterService.java
@@ -32,6 +32,4 @@ public class TestCMFMasterService extends CMFMasterService {
@Override
protected void displayWarning(boolean persisting) {
}
-
-
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/knox/blob/6736393d/gateway-test-release-utils/src/main/java/org/apache/knox/gateway/GatewayTestConfig.java
----------------------------------------------------------------------
diff --git a/gateway-test-release-utils/src/main/java/org/apache/knox/gateway/GatewayTestConfig.java b/gateway-test-release-utils/src/main/java/org/apache/knox/gateway/GatewayTestConfig.java
index c4a71a0..118f861 100644
--- a/gateway-test-release-utils/src/main/java/org/apache/knox/gateway/GatewayTestConfig.java
+++ b/gateway-test-release-utils/src/main/java/org/apache/knox/gateway/GatewayTestConfig.java
@@ -132,7 +132,7 @@ public class GatewayTestConfig extends Configuration implements GatewayConfig {
@Override
public long getGatewayIdleTimeout() {
- return 0l;
+ return 0L;
}
@Override
http://git-wip-us.apache.org/repos/asf/knox/blob/6736393d/gateway-test-utils/src/main/java/org/apache/knox/test/log/CollectAppender.java
----------------------------------------------------------------------
diff --git a/gateway-test-utils/src/main/java/org/apache/knox/test/log/CollectAppender.java b/gateway-test-utils/src/main/java/org/apache/knox/test/log/CollectAppender.java
index 88c3cd1..14bbe05 100644
--- a/gateway-test-utils/src/main/java/org/apache/knox/test/log/CollectAppender.java
+++ b/gateway-test-utils/src/main/java/org/apache/knox/test/log/CollectAppender.java
@@ -30,7 +30,7 @@ public class CollectAppender extends AppenderSkeleton {
}
public static final BlockingQueue<LoggingEvent> queue = new LinkedBlockingQueue<>();
-
+
@Override
protected void append( LoggingEvent event ) {
event.getProperties();
http://git-wip-us.apache.org/repos/asf/knox/blob/6736393d/gateway-test-utils/src/main/java/org/apache/knox/test/mock/MockRequestMatcher.java
----------------------------------------------------------------------
diff --git a/gateway-test-utils/src/main/java/org/apache/knox/test/mock/MockRequestMatcher.java b/gateway-test-utils/src/main/java/org/apache/knox/test/mock/MockRequestMatcher.java
index c2fe83e..5be7739 100644
--- a/gateway-test-utils/src/main/java/org/apache/knox/test/mock/MockRequestMatcher.java
+++ b/gateway-test-utils/src/main/java/org/apache/knox/test/mock/MockRequestMatcher.java
@@ -210,7 +210,7 @@ public class MockRequestMatcher {
request.getPathInfo(), is( pathInfo ) );
}
if( requestURL != null ) {
- assertThat(
+ assertThat(
"Request " + request.getMethod() + " " + request.getRequestURL() +
" does not have the expected requestURL",
request.getRequestURL().toString(), is( requestURL ) );
http://git-wip-us.apache.org/repos/asf/knox/blob/6736393d/gateway-test/src/test/java/org/apache/knox/gateway/GatewayCorrelationIdTest.java
----------------------------------------------------------------------
diff --git a/gateway-test/src/test/java/org/apache/knox/gateway/GatewayCorrelationIdTest.java b/gateway-test/src/test/java/org/apache/knox/gateway/GatewayCorrelationIdTest.java
index 754ef99..ecb0461 100644
--- a/gateway-test/src/test/java/org/apache/knox/gateway/GatewayCorrelationIdTest.java
+++ b/gateway-test/src/test/java/org/apache/knox/gateway/GatewayCorrelationIdTest.java
@@ -207,7 +207,7 @@ public class GatewayCorrelationIdTest {
// There should be a unique correlation id for each request
assertThat(requestIds.size(), is(numberTotalRequests));
-
+
LOG_EXIT();
}
}
http://git-wip-us.apache.org/repos/asf/knox/blob/6736393d/gateway-test/src/test/java/org/apache/knox/gateway/topology/monitor/RemoteConfigurationMonitorTest.java
----------------------------------------------------------------------
diff --git a/gateway-test/src/test/java/org/apache/knox/gateway/topology/monitor/RemoteConfigurationMonitorTest.java b/gateway-test/src/test/java/org/apache/knox/gateway/topology/monitor/RemoteConfigurationMonitorTest.java
index ef53de2..3894a69 100644
--- a/gateway-test/src/test/java/org/apache/knox/gateway/topology/monitor/RemoteConfigurationMonitorTest.java
+++ b/gateway-test/src/test/java/org/apache/knox/gateway/topology/monitor/RemoteConfigurationMonitorTest.java
@@ -486,7 +486,7 @@ public class RemoteConfigurationMonitorTest {
try {
cm.start();
-
+
// Test auth violation
clientService.get(configMonitorName).createEntry("/auth_test/child_node/test1");
assertNull("Creation should have been prevented since write access is not granted to the test client.",
http://git-wip-us.apache.org/repos/asf/knox/blob/6736393d/gateway-test/src/test/resources/org/apache/knox/gateway/GatewayBasicFuncTest/changes.txt
----------------------------------------------------------------------
diff --git a/gateway-test/src/test/resources/org/apache/knox/gateway/GatewayBasicFuncTest/changes.txt b/gateway-test/src/test/resources/org/apache/knox/gateway/GatewayBasicFuncTest/changes.txt
index 9249ab1..5125b64 100644
--- a/gateway-test/src/test/resources/org/apache/knox/gateway/GatewayBasicFuncTest/changes.txt
+++ b/gateway-test/src/test/resources/org/apache/knox/gateway/GatewayBasicFuncTest/changes.txt
@@ -3431,9 +3431,9 @@ Release 0.20.0 - 2009-04-15
HADOOP-4253. Fix various warnings generated by findbugs.
Following deprecated methods in RawLocalFileSystem are removed:
- public String getName()
- public void lock(Path p, boolean shared)
- public void release(Path p)
+ public String getName()
+ public void lock(Path p, boolean shared)
+ public void release(Path p)
(Suresh Srinivas via johan)
HADOOP-4618. Move http server from FSNamesystem into NameNode.
@@ -10189,7 +10189,7 @@ Release 0.10.1 - 2007-01-10
9. HADOOP-865. Fix S3 FileSystem so that partially created files can
be deleted. (Tom White via cutting)
-10. HADOOP-873. Pass java.library.path correctly to child processes.
+10. HADOOP-873. Pass java.library.path correctly to child processes.
(omalley via cutting)
11. HADOOP-851. Add support for the LZO codec. This is much faster
http://git-wip-us.apache.org/repos/asf/knox/blob/6736393d/gateway-test/src/test/resources/org/apache/knox/gateway/GatewayBasicFuncTest/yarn/app_running.json
----------------------------------------------------------------------
diff --git a/gateway-test/src/test/resources/org/apache/knox/gateway/GatewayBasicFuncTest/yarn/app_running.json b/gateway-test/src/test/resources/org/apache/knox/gateway/GatewayBasicFuncTest/yarn/app_running.json
index 441dbc8..a794b32 100644
--- a/gateway-test/src/test/resources/org/apache/knox/gateway/GatewayBasicFuncTest/yarn/app_running.json
+++ b/gateway-test/src/test/resources/org/apache/knox/gateway/GatewayBasicFuncTest/yarn/app_running.json
@@ -1,25 +1,25 @@
{
- "app":{
- "id":"application_1399541193872_0033",
- "user":"hdfs",
- "name":"Sleep job",
- "queue":"default",
- "state":"RUNNING",
- "finalStatus":"UNDEFINED",
- "progress":89.94973,
- "trackingUI":"ApplicationMaster",
- "trackingUrl":"$proxy_address/proxy/application_1399541193872_0033/",
- "diagnostics":"",
- "clusterId":1399541193872,
- "applicationType":"MAPREDUCE",
- "applicationTags":"",
- "startedTime":1401184778896,
- "finishedTime":0,
- "elapsedTime":139545,
- "amContainerLogs":"http://localhost:50060/node/containerlogs/container_1399541193872_0033_01_000001/hdfs",
- "amHostHttpAddress":"localhost:50060",
- "allocatedMB":4608,
- "allocatedVCores":2,
- "runningContainers":2
- }
+ "app":{
+ "id":"application_1399541193872_0033",
+ "user":"hdfs",
+ "name":"Sleep job",
+ "queue":"default",
+ "state":"RUNNING",
+ "finalStatus":"UNDEFINED",
+ "progress":89.94973,
+ "trackingUI":"ApplicationMaster",
+ "trackingUrl":"$proxy_address/proxy/application_1399541193872_0033/",
+ "diagnostics":"",
+ "clusterId":1399541193872,
+ "applicationType":"MAPREDUCE",
+ "applicationTags":"",
+ "startedTime":1401184778896,
+ "finishedTime":0,
+ "elapsedTime":139545,
+ "amContainerLogs":"http://localhost:50060/node/containerlogs/container_1399541193872_0033_01_000001/hdfs",
+ "amHostHttpAddress":"localhost:50060",
+ "allocatedMB":4608,
+ "allocatedVCores":2,
+ "runningContainers":2
+ }
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/knox/blob/6736393d/gateway-test/src/test/resources/org/apache/knox/gateway/GatewayBasicFuncTest/yarn/app_running.xml
----------------------------------------------------------------------
diff --git a/gateway-test/src/test/resources/org/apache/knox/gateway/GatewayBasicFuncTest/yarn/app_running.xml b/gateway-test/src/test/resources/org/apache/knox/gateway/GatewayBasicFuncTest/yarn/app_running.xml
index 424f9df..5c5a644 100644
--- a/gateway-test/src/test/resources/org/apache/knox/gateway/GatewayBasicFuncTest/yarn/app_running.xml
+++ b/gateway-test/src/test/resources/org/apache/knox/gateway/GatewayBasicFuncTest/yarn/app_running.xml
@@ -16,25 +16,25 @@ See the License for the specific language governing permissions and
limitations under the License.
-->
<app>
- <id>application_1399541193872_0033</id>
- <user>hdfs</user>
- <name>Sleep job</name>
- <queue>default</queue>
- <state>RUNNING</state>
- <finalStatus>UNDEFINED</finalStatus>
- <progress>89.94973</progress>
- <trackingUI>ApplicationMaster</trackingUI>
- <trackingUrl>$proxy_address/proxy/application_1399541193872_0033/</trackingUrl>
- <diagnostics></diagnostics>
- <clusterId>1399541193872</clusterId>
- <applicationType>MAPREDUCE</applicationType>
- <applicationTags></applicationTags>
- <startedTime>1401184778896</startedTime>
- <finishedTime>0</finishedTime>
- <elapsedTime>438390</elapsedTime>
- <amContainerLogs>http://localhost:50060/node/containerlogs/container_1399541193872_0033_01_000001/hdfs</amContainerLogs>
- <amHostHttpAddress>localhost:50060</amHostHttpAddress>
- <allocatedMB>4608</allocatedMB>
- <allocatedVCores>2</allocatedVCores>
- <runningContainers>2</runningContainers>
+ <id>application_1399541193872_0033</id>
+ <user>hdfs</user>
+ <name>Sleep job</name>
+ <queue>default</queue>
+ <state>RUNNING</state>
+ <finalStatus>UNDEFINED</finalStatus>
+ <progress>89.94973</progress>
+ <trackingUI>ApplicationMaster</trackingUI>
+ <trackingUrl>$proxy_address/proxy/application_1399541193872_0033/</trackingUrl>
+ <diagnostics></diagnostics>
+ <clusterId>1399541193872</clusterId>
+ <applicationType>MAPREDUCE</applicationType>
+ <applicationTags></applicationTags>
+ <startedTime>1401184778896</startedTime>
+ <finishedTime>0</finishedTime>
+ <elapsedTime>438390</elapsedTime>
+ <amContainerLogs>http://localhost:50060/node/containerlogs/container_1399541193872_0033_01_000001/hdfs</amContainerLogs>
+ <amHostHttpAddress>localhost:50060</amHostHttpAddress>
+ <allocatedMB>4608</allocatedMB>
+ <allocatedVCores>2</allocatedVCores>
+ <runningContainers>2</runningContainers>
</app>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/knox/blob/6736393d/gateway-test/src/test/resources/org/apache/knox/gateway/GatewayBasicFuncTest/yarn/app_succeeded.json
----------------------------------------------------------------------
diff --git a/gateway-test/src/test/resources/org/apache/knox/gateway/GatewayBasicFuncTest/yarn/app_succeeded.json b/gateway-test/src/test/resources/org/apache/knox/gateway/GatewayBasicFuncTest/yarn/app_succeeded.json
index bb72949..e583062 100644
--- a/gateway-test/src/test/resources/org/apache/knox/gateway/GatewayBasicFuncTest/yarn/app_succeeded.json
+++ b/gateway-test/src/test/resources/org/apache/knox/gateway/GatewayBasicFuncTest/yarn/app_succeeded.json
@@ -1,25 +1,25 @@
{
- "app":{
- "id":"application_1399541193872_0018",
- "user":"hdfs",
- "name":"Sleep job",
- "queue":"default",
- "state":"FINISHED",
- "finalStatus":"SUCCEEDED",
- "progress":100.0,
- "trackingUI":"History",
- "trackingUrl":"http://localhost:8088/proxy/application_1399541193872_0018/jobhistory/job/job_1399541193872_0018",
- "diagnostics":"",
- "clusterId":1399541193872,
- "applicationType":"MAPREDUCE",
- "applicationTags":"",
- "startedTime":1399903578539,
- "finishedTime":1399904819572,
- "elapsedTime":1241033,
- "amContainerLogs":"http://localhost:50060/node/containerlogs/container_1399541193872_0018_01_000001/hdfs",
- "amHostHttpAddress":"localhost:50060",
- "allocatedMB":0,
- "allocatedVCores":0,
- "runningContainers":0
- }
+ "app":{
+ "id":"application_1399541193872_0018",
+ "user":"hdfs",
+ "name":"Sleep job",
+ "queue":"default",
+ "state":"FINISHED",
+ "finalStatus":"SUCCEEDED",
+ "progress":100.0,
+ "trackingUI":"History",
+ "trackingUrl":"http://localhost:8088/proxy/application_1399541193872_0018/jobhistory/job/job_1399541193872_0018",
+ "diagnostics":"",
+ "clusterId":1399541193872,
+ "applicationType":"MAPREDUCE",
+ "applicationTags":"",
+ "startedTime":1399903578539,
+ "finishedTime":1399904819572,
+ "elapsedTime":1241033,
+ "amContainerLogs":"http://localhost:50060/node/containerlogs/container_1399541193872_0018_01_000001/hdfs",
+ "amHostHttpAddress":"localhost:50060",
+ "allocatedMB":0,
+ "allocatedVCores":0,
+ "runningContainers":0
+ }
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/knox/blob/6736393d/gateway-test/src/test/resources/org/apache/knox/gateway/GatewayBasicFuncTest/yarn/app_succeeded.xml
----------------------------------------------------------------------
diff --git a/gateway-test/src/test/resources/org/apache/knox/gateway/GatewayBasicFuncTest/yarn/app_succeeded.xml b/gateway-test/src/test/resources/org/apache/knox/gateway/GatewayBasicFuncTest/yarn/app_succeeded.xml
index 076ff95..204a481 100644
--- a/gateway-test/src/test/resources/org/apache/knox/gateway/GatewayBasicFuncTest/yarn/app_succeeded.xml
+++ b/gateway-test/src/test/resources/org/apache/knox/gateway/GatewayBasicFuncTest/yarn/app_succeeded.xml
@@ -16,25 +16,25 @@ See the License for the specific language governing permissions and
limitations under the License.
-->
<app>
- <id>application_1399541193872_0018</id>
- <user>hdfs</user>
- <name>Sleep job</name>
- <queue>default</queue>
- <state>FINISHED</state>
- <finalStatus>SUCCEEDED</finalStatus>
- <progress>100.0</progress>
- <trackingUI>History</trackingUI>
- <trackingUrl>http://localhost:8088/proxy/application_1399541193872_0018/jobhistory/job/job_1399541193872_0018</trackingUrl>
- <diagnostics></diagnostics>
- <clusterId>1399541193872</clusterId>
- <applicationType>MAPREDUCE</applicationType>
- <applicationTags></applicationTags>
- <startedTime>1399903578539</startedTime>
- <finishedTime>1399904819572</finishedTime>
- <elapsedTime>1241033</elapsedTime>
- <amContainerLogs>http://localhost:50060/node/containerlogs/container_1399541193872_0018_01_000001/hdfs</amContainerLogs>
- <amHostHttpAddress>localhost:50060</amHostHttpAddress>
- <allocatedMB>0</allocatedMB>
- <allocatedVCores>0</allocatedVCores>
- <runningContainers>0</runningContainers>
+ <id>application_1399541193872_0018</id>
+ <user>hdfs</user>
+ <name>Sleep job</name>
+ <queue>default</queue>
+ <state>FINISHED</state>
+ <finalStatus>SUCCEEDED</finalStatus>
+ <progress>100.0</progress>
+ <trackingUI>History</trackingUI>
+ <trackingUrl>http://localhost:8088/proxy/application_1399541193872_0018/jobhistory/job/job_1399541193872_0018</trackingUrl>
+ <diagnostics></diagnostics>
+ <clusterId>1399541193872</clusterId>
+ <applicationType>MAPREDUCE</applicationType>
+ <applicationTags></applicationTags>
+ <startedTime>1399903578539</startedTime>
+ <finishedTime>1399904819572</finishedTime>
+ <elapsedTime>1241033</elapsedTime>
+ <amContainerLogs>http://localhost:50060/node/containerlogs/container_1399541193872_0018_01_000001/hdfs</amContainerLogs>
+ <amHostHttpAddress>localhost:50060</amHostHttpAddress>
+ <allocatedMB>0</allocatedMB>
+ <allocatedVCores>0</allocatedVCores>
+ <runningContainers>0</runningContainers>
</app>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/knox/blob/6736393d/gateway-test/src/test/resources/org/apache/knox/gateway/GatewayBasicFuncTest/yarn/appattempts.json
----------------------------------------------------------------------
diff --git a/gateway-test/src/test/resources/org/apache/knox/gateway/GatewayBasicFuncTest/yarn/appattempts.json b/gateway-test/src/test/resources/org/apache/knox/gateway/GatewayBasicFuncTest/yarn/appattempts.json
index ef21483..a9a6d37 100644
--- a/gateway-test/src/test/resources/org/apache/knox/gateway/GatewayBasicFuncTest/yarn/appattempts.json
+++ b/gateway-test/src/test/resources/org/apache/knox/gateway/GatewayBasicFuncTest/yarn/appattempts.json
@@ -1,14 +1,14 @@
{
- "appAttempts":{
- "appAttempt":[
- {
- "id":1,
- "startTime":1399903578541,
- "containerId":"container_1399541193872_0018_01_000001",
- "nodeHttpAddress":"localhost:50060",
- "nodeId":"localhost:45454",
- "logsLink":"//localhost:50060/node/containerlogs/container_1399541193872_0018_01_000001/hdfs"
- }
- ]
- }
+ "appAttempts":{
+ "appAttempt":[
+ {
+ "id":1,
+ "startTime":1399903578541,
+ "containerId":"container_1399541193872_0018_01_000001",
+ "nodeHttpAddress":"localhost:50060",
+ "nodeId":"localhost:45454",
+ "logsLink":"//localhost:50060/node/containerlogs/container_1399541193872_0018_01_000001/hdfs"
+ }
+ ]
+ }
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/knox/blob/6736393d/gateway-test/src/test/resources/org/apache/knox/gateway/GatewayBasicFuncTest/yarn/appattempts.xml
----------------------------------------------------------------------
diff --git a/gateway-test/src/test/resources/org/apache/knox/gateway/GatewayBasicFuncTest/yarn/appattempts.xml b/gateway-test/src/test/resources/org/apache/knox/gateway/GatewayBasicFuncTest/yarn/appattempts.xml
index 57a6378..cb53782 100644
--- a/gateway-test/src/test/resources/org/apache/knox/gateway/GatewayBasicFuncTest/yarn/appattempts.xml
+++ b/gateway-test/src/test/resources/org/apache/knox/gateway/GatewayBasicFuncTest/yarn/appattempts.xml
@@ -16,12 +16,12 @@ See the License for the specific language governing permissions and
limitations under the License.
-->
<appAttempts>
- <appAttempt>
- <id>1</id>
- <startTime>1399903578541</startTime>
- <containerId>container_1399541193872_0018_01_000001</containerId>
- <nodeHttpAddress>localhost:50060</nodeHttpAddress>
- <nodeId>localhost:45454</nodeId>
- <logsLink>//localhost:50060/node/containerlogs/container_1399541193872_0018_01_000001/hdfs</logsLink>
- </appAttempt>
+ <appAttempt>
+ <id>1</id>
+ <startTime>1399903578541</startTime>
+ <containerId>container_1399541193872_0018_01_000001</containerId>
+ <nodeHttpAddress>localhost:50060</nodeHttpAddress>
+ <nodeId>localhost:45454</nodeId>
+ <logsLink>//localhost:50060/node/containerlogs/container_1399541193872_0018_01_000001/hdfs</logsLink>
+ </appAttempt>
</appAttempts>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/knox/blob/6736393d/gateway-test/src/test/resources/org/apache/knox/gateway/GatewayBasicFuncTest/yarn/apps.json
----------------------------------------------------------------------
diff --git a/gateway-test/src/test/resources/org/apache/knox/gateway/GatewayBasicFuncTest/yarn/apps.json b/gateway-test/src/test/resources/org/apache/knox/gateway/GatewayBasicFuncTest/yarn/apps.json
index dc95157..2da9231 100644
--- a/gateway-test/src/test/resources/org/apache/knox/gateway/GatewayBasicFuncTest/yarn/apps.json
+++ b/gateway-test/src/test/resources/org/apache/knox/gateway/GatewayBasicFuncTest/yarn/apps.json
@@ -1,73 +1,73 @@
{
- "apps":{
- "app":[
- {
- "id":"application_1399541193872_0018",
- "user":"hdfs",
- "name":"Sleep job",
- "queue":"default",
- "state":"FINISHED",
- "finalStatus":"SUCCEEDED",
- "progress":100.0,
- "trackingUI":"History",
- "trackingUrl":"http://localhost:8088/proxy/application_1399541193872_0018/jobhistory/job/job_1399541193872_0018",
- "diagnostics":"",
- "clusterId":1399541193872,
- "applicationType":"MAPREDUCE",
- "applicationTags":"",
- "startedTime":1399903578539,
- "finishedTime":1399904819572,
- "elapsedTime":1241033,
- "amContainerLogs":"http://localhost:50060/node/containerlogs/container_1399541193872_0018_01_000001/hdfs",
- "amHostHttpAddress":"localhost:50060",
- "allocatedMB":0,
- "allocatedVCores":0,
- "runningContainers":0
- },
- {
- "id":"application_1399541193872_0031",
- "user":"hdfs",
- "name":"Sleep job",
- "queue":"default",
- "state":"RUNNING",
- "finalStatus":"UNDEFINED",
- "progress":89.94973,
- "trackingUI":"ApplicationMaster",
- "trackingUrl":"http://localhost:8088/proxy/application_1399541193872_0031/",
- "diagnostics":"",
- "clusterId":1399541193872,
- "applicationType":"MAPREDUCE",
- "applicationTags":"",
- "startedTime":1400855314702,
- "finishedTime":0,
- "elapsedTime":471349,
- "amContainerLogs":"http://localhost:50060/node/containerlogs/container_1399541193872_0031_01_000001/hdfs",
- "amHostHttpAddress":"localhost:50060",
- "allocatedMB":4608,
- "allocatedVCores":2,
- "runningContainers":2
- },
- {
- "id":"application_1399541193872_0009",
- "user":"hdfs",
- "name":"Sleep job",
- "queue":"a1",
- "state":"FAILED",
- "finalStatus":"FAILED",
- "progress":0.0,
- "trackingUI":"History",
+ "apps":{
+ "app":[
+ {
+ "id":"application_1399541193872_0018",
+ "user":"hdfs",
+ "name":"Sleep job",
+ "queue":"default",
+ "state":"FINISHED",
+ "finalStatus":"SUCCEEDED",
+ "progress":100.0,
+ "trackingUI":"History",
+ "trackingUrl":"http://localhost:8088/proxy/application_1399541193872_0018/jobhistory/job/job_1399541193872_0018",
+ "diagnostics":"",
+ "clusterId":1399541193872,
+ "applicationType":"MAPREDUCE",
+ "applicationTags":"",
+ "startedTime":1399903578539,
+ "finishedTime":1399904819572,
+ "elapsedTime":1241033,
+ "amContainerLogs":"http://localhost:50060/node/containerlogs/container_1399541193872_0018_01_000001/hdfs",
+ "amHostHttpAddress":"localhost:50060",
+ "allocatedMB":0,
+ "allocatedVCores":0,
+ "runningContainers":0
+ },
+ {
+ "id":"application_1399541193872_0031",
+ "user":"hdfs",
+ "name":"Sleep job",
+ "queue":"default",
+ "state":"RUNNING",
+ "finalStatus":"UNDEFINED",
+ "progress":89.94973,
+ "trackingUI":"ApplicationMaster",
+ "trackingUrl":"http://localhost:8088/proxy/application_1399541193872_0031/",
+ "diagnostics":"",
+ "clusterId":1399541193872,
+ "applicationType":"MAPREDUCE",
+ "applicationTags":"",
+ "startedTime":1400855314702,
+ "finishedTime":0,
+ "elapsedTime":471349,
+ "amContainerLogs":"http://localhost:50060/node/containerlogs/container_1399541193872_0031_01_000001/hdfs",
+ "amHostHttpAddress":"localhost:50060",
+ "allocatedMB":4608,
+ "allocatedVCores":2,
+ "runningContainers":2
+ },
+ {
+ "id":"application_1399541193872_0009",
+ "user":"hdfs",
+ "name":"Sleep job",
+ "queue":"a1",
+ "state":"FAILED",
+ "finalStatus":"FAILED",
+ "progress":0.0,
+ "trackingUI":"History",
"trackingUrl":"http://localhost:8088/cluster/app/application_1409008107556_0001",
"diagnostics":"Application application_1399541193872_0009 submitted by user hdfs to unknown queue: a1",
- "clusterId":1399541193872,
- "applicationType":"MAPREDUCE",
- "applicationTags":"",
- "startedTime":1399543135010,
- "finishedTime":1399543135013,
- "elapsedTime":3,
- "allocatedMB":0,
- "allocatedVCores":0,
- "runningContainers":0
- }
- ]
- }
+ "clusterId":1399541193872,
+ "applicationType":"MAPREDUCE",
+ "applicationTags":"",
+ "startedTime":1399543135010,
+ "finishedTime":1399543135013,
+ "elapsedTime":3,
+ "allocatedMB":0,
+ "allocatedVCores":0,
+ "runningContainers":0
+ }
+ ]
+ }
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/knox/blob/6736393d/gateway-test/src/test/resources/org/apache/knox/gateway/GatewayBasicFuncTest/yarn/apps.xml
----------------------------------------------------------------------
diff --git a/gateway-test/src/test/resources/org/apache/knox/gateway/GatewayBasicFuncTest/yarn/apps.xml b/gateway-test/src/test/resources/org/apache/knox/gateway/GatewayBasicFuncTest/yarn/apps.xml
index ad11446..8e6e6c1 100644
--- a/gateway-test/src/test/resources/org/apache/knox/gateway/GatewayBasicFuncTest/yarn/apps.xml
+++ b/gateway-test/src/test/resources/org/apache/knox/gateway/GatewayBasicFuncTest/yarn/apps.xml
@@ -16,71 +16,71 @@ See the License for the specific language governing permissions and
limitations under the License.
-->
<apps>
- <app>
- <id>application_1399541193872_0018</id>
- <user>hdfs</user>
- <name>Sleep job</name>
- <queue>default</queue>
- <state>FINISHED</state>
- <finalStatus>SUCCEEDED</finalStatus>
- <progress>100.0</progress>
- <trackingUI>History</trackingUI>
- <trackingUrl>http://localhost:8088/proxy/application_1399541193872_0018/jobhistory/job/job_1399541193872_0018</trackingUrl>
- <diagnostics></diagnostics>
- <clusterId>1399541193872</clusterId>
- <applicationType>MAPREDUCE</applicationType>
- <applicationTags></applicationTags>
- <startedTime>1399903578539</startedTime>
- <finishedTime>1399904819572</finishedTime>
- <elapsedTime>1241033</elapsedTime>
- <amContainerLogs>http://localhost:50060/node/containerlogs/container_1399541193872_0018_01_000001/hdfs</amContainerLogs>
- <amHostHttpAddress>localhost:50060</amHostHttpAddress>
- <allocatedMB>0</allocatedMB>
- <allocatedVCores>0</allocatedVCores>
- <runningContainers>0</runningContainers>
- </app>
- <app>
- <id>application_1399541193872_0031</id>
- <user>hdfs</user>
- <name>Sleep job</name>
- <queue>default</queue>
- <state>RUNNING</state>
- <finalStatus>UNDEFINED</finalStatus>
- <progress>89.94973</progress>
- <trackingUI>ApplicationMaster</trackingUI>
- <trackingUrl>http://localhost:8088/proxy/application_1399541193872_0031/</trackingUrl>
- <diagnostics></diagnostics>
- <clusterId>1399541193872</clusterId>
- <applicationType>MAPREDUCE</applicationType>
- <applicationTags></applicationTags>
- <startedTime>1400855314702</startedTime>
- <finishedTime>0</finishedTime>
- <elapsedTime>548138</elapsedTime>
- <amContainerLogs>http://localhost:50060/node/containerlogs/container_1399541193872_0031_01_000001/hdfs</amContainerLogs>
- <amHostHttpAddress>localhost:50060</amHostHttpAddress>
- <allocatedMB>4608</allocatedMB>
- <allocatedVCores>2</allocatedVCores>
- <runningContainers>2</runningContainers>
- </app>
- <app>
- <id>application_1399541193872_0009</id>
- <user>hdfs</user>
- <name>Sleep job</name>
- <queue>a1</queue>
- <state>FAILED</state>
- <finalStatus>FAILED</finalStatus>
- <progress>0.0</progress>
- <trackingUI>History</trackingUI>
+ <app>
+ <id>application_1399541193872_0018</id>
+ <user>hdfs</user>
+ <name>Sleep job</name>
+ <queue>default</queue>
+ <state>FINISHED</state>
+ <finalStatus>SUCCEEDED</finalStatus>
+ <progress>100.0</progress>
+ <trackingUI>History</trackingUI>
+ <trackingUrl>http://localhost:8088/proxy/application_1399541193872_0018/jobhistory/job/job_1399541193872_0018</trackingUrl>
+ <diagnostics></diagnostics>
+ <clusterId>1399541193872</clusterId>
+ <applicationType>MAPREDUCE</applicationType>
+ <applicationTags></applicationTags>
+ <startedTime>1399903578539</startedTime>
+ <finishedTime>1399904819572</finishedTime>
+ <elapsedTime>1241033</elapsedTime>
+ <amContainerLogs>http://localhost:50060/node/containerlogs/container_1399541193872_0018_01_000001/hdfs</amContainerLogs>
+ <amHostHttpAddress>localhost:50060</amHostHttpAddress>
+ <allocatedMB>0</allocatedMB>
+ <allocatedVCores>0</allocatedVCores>
+ <runningContainers>0</runningContainers>
+ </app>
+ <app>
+ <id>application_1399541193872_0031</id>
+ <user>hdfs</user>
+ <name>Sleep job</name>
+ <queue>default</queue>
+ <state>RUNNING</state>
+ <finalStatus>UNDEFINED</finalStatus>
+ <progress>89.94973</progress>
+ <trackingUI>ApplicationMaster</trackingUI>
+ <trackingUrl>http://localhost:8088/proxy/application_1399541193872_0031/</trackingUrl>
+ <diagnostics></diagnostics>
+ <clusterId>1399541193872</clusterId>
+ <applicationType>MAPREDUCE</applicationType>
+ <applicationTags></applicationTags>
+ <startedTime>1400855314702</startedTime>
+ <finishedTime>0</finishedTime>
+ <elapsedTime>548138</elapsedTime>
+ <amContainerLogs>http://localhost:50060/node/containerlogs/container_1399541193872_0031_01_000001/hdfs</amContainerLogs>
+ <amHostHttpAddress>localhost:50060</amHostHttpAddress>
+ <allocatedMB>4608</allocatedMB>
+ <allocatedVCores>2</allocatedVCores>
+ <runningContainers>2</runningContainers>
+ </app>
+ <app>
+ <id>application_1399541193872_0009</id>
+ <user>hdfs</user>
+ <name>Sleep job</name>
+ <queue>a1</queue>
+ <state>FAILED</state>
+ <finalStatus>FAILED</finalStatus>
+ <progress>0.0</progress>
+ <trackingUI>History</trackingUI>
<trackingUrl>http://localhost:8088/cluster/app/application_1409008107556_0001</trackingUrl>
<diagnostics>Application application_1399541193872_0009 submitted by user hdfs to unknown queue: a1</diagnostics>
- <clusterId>1399541193872</clusterId>
- <applicationType>MAPREDUCE</applicationType>
- <applicationTags></applicationTags>
- <startedTime>1399543135010</startedTime>
- <finishedTime>1399543135013</finishedTime>
- <elapsedTime>3</elapsedTime>
- <allocatedMB>0</allocatedMB>
- <allocatedVCores>0</allocatedVCores>
- <runningContainers>0</runningContainers>
- </app>
+ <clusterId>1399541193872</clusterId>
+ <applicationType>MAPREDUCE</applicationType>
+ <applicationTags></applicationTags>
+ <startedTime>1399543135010</startedTime>
+ <finishedTime>1399543135013</finishedTime>
+ <elapsedTime>3</elapsedTime>
+ <allocatedMB>0</allocatedMB>
+ <allocatedVCores>0</allocatedVCores>
+ <runningContainers>0</runningContainers>
+ </app>
</apps>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/knox/blob/6736393d/gateway-test/src/test/resources/org/apache/knox/gateway/GatewayBasicFuncTest/yarn/appstatistics.json
----------------------------------------------------------------------
diff --git a/gateway-test/src/test/resources/org/apache/knox/gateway/GatewayBasicFuncTest/yarn/appstatistics.json b/gateway-test/src/test/resources/org/apache/knox/gateway/GatewayBasicFuncTest/yarn/appstatistics.json
index 894c7c6..c6b85f8 100644
--- a/gateway-test/src/test/resources/org/apache/knox/gateway/GatewayBasicFuncTest/yarn/appstatistics.json
+++ b/gateway-test/src/test/resources/org/apache/knox/gateway/GatewayBasicFuncTest/yarn/appstatistics.json
@@ -1,26 +1,26 @@
{
- "appStatInfo":{
- "statItem":[
- {
- "state":"FAILED",
- "type":"mapreduce",
- "count":2
- },
- {
- "state":"FINISHED",
- "type":"mapreduce",
- "count":31
- },
- {
- "state":"RUNNING",
- "type":"mapreduce",
- "count":1
- },
- {
- "state":"ACCEPTED",
- "type":"mapreduce",
- "count":0
- }
- ]
- }
+ "appStatInfo":{
+ "statItem":[
+ {
+ "state":"FAILED",
+ "type":"mapreduce",
+ "count":2
+ },
+ {
+ "state":"FINISHED",
+ "type":"mapreduce",
+ "count":31
+ },
+ {
+ "state":"RUNNING",
+ "type":"mapreduce",
+ "count":1
+ },
+ {
+ "state":"ACCEPTED",
+ "type":"mapreduce",
+ "count":0
+ }
+ ]
+ }
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/knox/blob/6736393d/gateway-test/src/test/resources/org/apache/knox/gateway/GatewayBasicFuncTest/yarn/appstatistics.xml
----------------------------------------------------------------------
diff --git a/gateway-test/src/test/resources/org/apache/knox/gateway/GatewayBasicFuncTest/yarn/appstatistics.xml b/gateway-test/src/test/resources/org/apache/knox/gateway/GatewayBasicFuncTest/yarn/appstatistics.xml
index a356c78..0149ca6 100644
--- a/gateway-test/src/test/resources/org/apache/knox/gateway/GatewayBasicFuncTest/yarn/appstatistics.xml
+++ b/gateway-test/src/test/resources/org/apache/knox/gateway/GatewayBasicFuncTest/yarn/appstatistics.xml
@@ -16,24 +16,24 @@ See the License for the specific language governing permissions and
limitations under the License.
-->
<appStatInfo>
- <statItem>
- <state>FAILED</state>
- <type>mapreduce</type>
- <count>2</count>
- </statItem>
- <statItem>
- <state>FINISHED</state>
- <type>mapreduce</type>
- <count>31</count>
- </statItem>
- <statItem>
- <state>RUNNING</state>
- <type>mapreduce</type>
- <count>1</count>
- </statItem>
- <statItem>
- <state>ACCEPTED</state>
- <type>mapreduce</type>
- <count>0</count>
- </statItem>
+ <statItem>
+ <state>FAILED</state>
+ <type>mapreduce</type>
+ <count>2</count>
+ </statItem>
+ <statItem>
+ <state>FINISHED</state>
+ <type>mapreduce</type>
+ <count>31</count>
+ </statItem>
+ <statItem>
+ <state>RUNNING</state>
+ <type>mapreduce</type>
+ <count>1</count>
+ </statItem>
+ <statItem>
+ <state>ACCEPTED</state>
+ <type>mapreduce</type>
+ <count>0</count>
+ </statItem>
</appStatInfo>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/knox/blob/6736393d/gateway-test/src/test/resources/org/apache/knox/gateway/GatewayBasicFuncTest/yarn/cluster-info.json
----------------------------------------------------------------------
diff --git a/gateway-test/src/test/resources/org/apache/knox/gateway/GatewayBasicFuncTest/yarn/cluster-info.json b/gateway-test/src/test/resources/org/apache/knox/gateway/GatewayBasicFuncTest/yarn/cluster-info.json
index fe49a72..0d158b1 100644
--- a/gateway-test/src/test/resources/org/apache/knox/gateway/GatewayBasicFuncTest/yarn/cluster-info.json
+++ b/gateway-test/src/test/resources/org/apache/knox/gateway/GatewayBasicFuncTest/yarn/cluster-info.json
@@ -1,14 +1,14 @@
{
- "clusterInfo":{
- "id":1399541193872,
- "startedOn":1399541193872,
- "state":"STARTED",
- "haState":"ACTIVE",
- "resourceManagerVersion":"2.4.0.2.1.1.0-390",
- "resourceManagerBuildVersion":"2.4.0.2.1.1.0-390 from 68ceccf06a4441273e81a5ec856d41fc7e11c792 by jenkins source checksum a06aa69de28a8ebc9ddba56f20d6d73d",
- "resourceManagerVersionBuiltOn":"2014-04-23T16:39Z",
- "hadoopVersion":"2.4.0.2.1.1.0-390",
- "hadoopBuildVersion":"2.4.0.2.1.1.0-390 from 68ceccf06a4441273e81a5ec856d41fc7e11c792 by jenkins source checksum 9e788148daa5dd7934eb468e57e037b5",
- "hadoopVersionBuiltOn":"2014-04-23T16:32Z"
- }
+ "clusterInfo":{
+ "id":1399541193872,
+ "startedOn":1399541193872,
+ "state":"STARTED",
+ "haState":"ACTIVE",
+ "resourceManagerVersion":"2.4.0.2.1.1.0-390",
+ "resourceManagerBuildVersion":"2.4.0.2.1.1.0-390 from 68ceccf06a4441273e81a5ec856d41fc7e11c792 by jenkins source checksum a06aa69de28a8ebc9ddba56f20d6d73d",
+ "resourceManagerVersionBuiltOn":"2014-04-23T16:39Z",
+ "hadoopVersion":"2.4.0.2.1.1.0-390",
+ "hadoopBuildVersion":"2.4.0.2.1.1.0-390 from 68ceccf06a4441273e81a5ec856d41fc7e11c792 by jenkins source checksum 9e788148daa5dd7934eb468e57e037b5",
+ "hadoopVersionBuiltOn":"2014-04-23T16:32Z"
+ }
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/knox/blob/6736393d/gateway-test/src/test/resources/org/apache/knox/gateway/GatewayBasicFuncTest/yarn/cluster-info.xml
----------------------------------------------------------------------
diff --git a/gateway-test/src/test/resources/org/apache/knox/gateway/GatewayBasicFuncTest/yarn/cluster-info.xml b/gateway-test/src/test/resources/org/apache/knox/gateway/GatewayBasicFuncTest/yarn/cluster-info.xml
index dcd6a99..b2048f5 100644
--- a/gateway-test/src/test/resources/org/apache/knox/gateway/GatewayBasicFuncTest/yarn/cluster-info.xml
+++ b/gateway-test/src/test/resources/org/apache/knox/gateway/GatewayBasicFuncTest/yarn/cluster-info.xml
@@ -16,19 +16,19 @@ See the License for the specific language governing permissions and
limitations under the License.
-->
<clusterInfo>
- <id>1399541193872</id>
- <startedOn>1399541193872</startedOn>
- <state>STARTED</state>
- <haState>ACTIVE</haState>
- <resourceManagerVersion>2.4.0.2.1.1.0-390</resourceManagerVersion>
- <resourceManagerBuildVersion>2.4.0.2.1.1.0-390 from
- 68ceccf06a4441273e81a5ec856d41fc7e11c792 by jenkins source checksum
- a06aa69de28a8ebc9ddba56f20d6d73d</resourceManagerBuildVersion>
- <resourceManagerVersionBuiltOn>2014-04-23T16:39Z
- </resourceManagerVersionBuiltOn>
- <hadoopVersion>2.4.0.2.1.1.0-390</hadoopVersion>
- <hadoopBuildVersion>2.4.0.2.1.1.0-390 from
- 68ceccf06a4441273e81a5ec856d41fc7e11c792 by jenkins source checksum
- 9e788148daa5dd7934eb468e57e037b5</hadoopBuildVersion>
- <hadoopVersionBuiltOn>2014-04-23T16:32Z</hadoopVersionBuiltOn>
+ <id>1399541193872</id>
+ <startedOn>1399541193872</startedOn>
+ <state>STARTED</state>
+ <haState>ACTIVE</haState>
+ <resourceManagerVersion>2.4.0.2.1.1.0-390</resourceManagerVersion>
+ <resourceManagerBuildVersion>2.4.0.2.1.1.0-390 from
+ 68ceccf06a4441273e81a5ec856d41fc7e11c792 by jenkins source checksum
+ a06aa69de28a8ebc9ddba56f20d6d73d</resourceManagerBuildVersion>
+ <resourceManagerVersionBuiltOn>2014-04-23T16:39Z
+ </resourceManagerVersionBuiltOn>
+ <hadoopVersion>2.4.0.2.1.1.0-390</hadoopVersion>
+ <hadoopBuildVersion>2.4.0.2.1.1.0-390 from
+ 68ceccf06a4441273e81a5ec856d41fc7e11c792 by jenkins source checksum
+ 9e788148daa5dd7934eb468e57e037b5</hadoopBuildVersion>
+ <hadoopVersionBuiltOn>2014-04-23T16:32Z</hadoopVersionBuiltOn>
</clusterInfo>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/knox/blob/6736393d/gateway-test/src/test/resources/org/apache/knox/gateway/GatewayBasicFuncTest/yarn/cluster-metrics.json
----------------------------------------------------------------------
diff --git a/gateway-test/src/test/resources/org/apache/knox/gateway/GatewayBasicFuncTest/yarn/cluster-metrics.json b/gateway-test/src/test/resources/org/apache/knox/gateway/GatewayBasicFuncTest/yarn/cluster-metrics.json
index 35b7228..675991f 100644
--- a/gateway-test/src/test/resources/org/apache/knox/gateway/GatewayBasicFuncTest/yarn/cluster-metrics.json
+++ b/gateway-test/src/test/resources/org/apache/knox/gateway/GatewayBasicFuncTest/yarn/cluster-metrics.json
@@ -1,23 +1,23 @@
{
- "clusterMetrics":{
- "appsSubmitted":28,
- "appsCompleted":28,
- "appsPending":0,
- "appsRunning":0,
- "appsFailed":0,
- "appsKilled":0,
- "reservedMB":0,
- "availableMB":8192,
- "allocatedMB":0,
- "containersAllocated":0,
- "containersReserved":0,
- "containersPending":0,
- "totalMB":8192,
- "totalNodes":1,
- "lostNodes":0,
- "unhealthyNodes":0,
- "decommissionedNodes":0,
- "rebootedNodes":0,
- "activeNodes":1
- }
+ "clusterMetrics":{
+ "appsSubmitted":28,
+ "appsCompleted":28,
+ "appsPending":0,
+ "appsRunning":0,
+ "appsFailed":0,
+ "appsKilled":0,
+ "reservedMB":0,
+ "availableMB":8192,
+ "allocatedMB":0,
+ "containersAllocated":0,
+ "containersReserved":0,
+ "containersPending":0,
+ "totalMB":8192,
+ "totalNodes":1,
+ "lostNodes":0,
+ "unhealthyNodes":0,
+ "decommissionedNodes":0,
+ "rebootedNodes":0,
+ "activeNodes":1
+ }
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/knox/blob/6736393d/gateway-test/src/test/resources/org/apache/knox/gateway/GatewayBasicFuncTest/yarn/cluster-metrics.xml
----------------------------------------------------------------------
diff --git a/gateway-test/src/test/resources/org/apache/knox/gateway/GatewayBasicFuncTest/yarn/cluster-metrics.xml b/gateway-test/src/test/resources/org/apache/knox/gateway/GatewayBasicFuncTest/yarn/cluster-metrics.xml
index e14e643..61b2f10 100644
--- a/gateway-test/src/test/resources/org/apache/knox/gateway/GatewayBasicFuncTest/yarn/cluster-metrics.xml
+++ b/gateway-test/src/test/resources/org/apache/knox/gateway/GatewayBasicFuncTest/yarn/cluster-metrics.xml
@@ -16,23 +16,23 @@ See the License for the specific language governing permissions and
limitations under the License.
-->
<clusterMetrics>
- <appsSubmitted>28</appsSubmitted>
- <appsCompleted>28</appsCompleted>
- <appsPending>0</appsPending>
- <appsRunning>0</appsRunning>
- <appsFailed>0</appsFailed>
- <appsKilled>0</appsKilled>
- <reservedMB>0</reservedMB>
- <availableMB>8192</availableMB>
- <allocatedMB>0</allocatedMB>
- <containersAllocated>0</containersAllocated>
- <containersReserved>0</containersReserved>
- <containersPending>0</containersPending>
- <totalMB>8192</totalMB>
- <totalNodes>1</totalNodes>
- <lostNodes>0</lostNodes>
- <unhealthyNodes>0</unhealthyNodes>
- <decommissionedNodes>0</decommissionedNodes>
- <rebootedNodes>0</rebootedNodes>
- <activeNodes>1</activeNodes>
+ <appsSubmitted>28</appsSubmitted>
+ <appsCompleted>28</appsCompleted>
+ <appsPending>0</appsPending>
+ <appsRunning>0</appsRunning>
+ <appsFailed>0</appsFailed>
+ <appsKilled>0</appsKilled>
+ <reservedMB>0</reservedMB>
+ <availableMB>8192</availableMB>
+ <allocatedMB>0</allocatedMB>
+ <containersAllocated>0</containersAllocated>
+ <containersReserved>0</containersReserved>
+ <containersPending>0</containersPending>
+ <totalMB>8192</totalMB>
+ <totalNodes>1</totalNodes>
+ <lostNodes>0</lostNodes>
+ <unhealthyNodes>0</unhealthyNodes>
+ <decommissionedNodes>0</decommissionedNodes>
+ <rebootedNodes>0</rebootedNodes>
+ <activeNodes>1</activeNodes>
</clusterMetrics>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/knox/blob/6736393d/gateway-test/src/test/resources/org/apache/knox/gateway/GatewayBasicFuncTest/yarn/node.json
----------------------------------------------------------------------
diff --git a/gateway-test/src/test/resources/org/apache/knox/gateway/GatewayBasicFuncTest/yarn/node.json b/gateway-test/src/test/resources/org/apache/knox/gateway/GatewayBasicFuncTest/yarn/node.json
index 0d359fa..facacb0 100644
--- a/gateway-test/src/test/resources/org/apache/knox/gateway/GatewayBasicFuncTest/yarn/node.json
+++ b/gateway-test/src/test/resources/org/apache/knox/gateway/GatewayBasicFuncTest/yarn/node.json
@@ -1,15 +1,15 @@
{
- "node":{
- "rack":"/default-rack",
- "state":"RUNNING",
- "id":"localhost:45454",
- "nodeHostName":"localhost",
- "nodeHTTPAddress":"localhost:50060",
- "lastHealthUpdate":1401197561733,
- "version":"2.4.0.2.1.1.0-390",
- "healthReport":"",
- "numContainers":0,
- "usedMemoryMB":0,
- "availMemoryMB":8192
- }
+ "node":{
+ "rack":"/default-rack",
+ "state":"RUNNING",
+ "id":"localhost:45454",
+ "nodeHostName":"localhost",
+ "nodeHTTPAddress":"localhost:50060",
+ "lastHealthUpdate":1401197561733,
+ "version":"2.4.0.2.1.1.0-390",
+ "healthReport":"",
+ "numContainers":0,
+ "usedMemoryMB":0,
+ "availMemoryMB":8192
+ }
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/knox/blob/6736393d/gateway-test/src/test/resources/org/apache/knox/gateway/GatewayBasicFuncTest/yarn/node.xml
----------------------------------------------------------------------
diff --git a/gateway-test/src/test/resources/org/apache/knox/gateway/GatewayBasicFuncTest/yarn/node.xml b/gateway-test/src/test/resources/org/apache/knox/gateway/GatewayBasicFuncTest/yarn/node.xml
index 2599ca3..462ba2a 100644
--- a/gateway-test/src/test/resources/org/apache/knox/gateway/GatewayBasicFuncTest/yarn/node.xml
+++ b/gateway-test/src/test/resources/org/apache/knox/gateway/GatewayBasicFuncTest/yarn/node.xml
@@ -16,15 +16,15 @@ See the License for the specific language governing permissions and
limitations under the License.
-->
<node>
- <rack>/default-rack</rack>
- <state>RUNNING</state>
- <id>localhost:45454</id>
- <nodeHostName>localhost</nodeHostName>
- <nodeHTTPAddress>localhost:50060</nodeHTTPAddress>
- <lastHealthUpdate>1401197651742</lastHealthUpdate>
- <version>2.4.0.2.1.1.0-390</version>
- <healthReport></healthReport>
- <numContainers>0</numContainers>
- <usedMemoryMB>0</usedMemoryMB>
- <availMemoryMB>8192</availMemoryMB>
+ <rack>/default-rack</rack>
+ <state>RUNNING</state>
+ <id>localhost:45454</id>
+ <nodeHostName>localhost</nodeHostName>
+ <nodeHTTPAddress>localhost:50060</nodeHTTPAddress>
+ <lastHealthUpdate>1401197651742</lastHealthUpdate>
+ <version>2.4.0.2.1.1.0-390</version>
+ <healthReport></healthReport>
+ <numContainers>0</numContainers>
+ <usedMemoryMB>0</usedMemoryMB>
+ <availMemoryMB>8192</availMemoryMB>
</node>
\ No newline at end of file