@Test public void testWasbJson() { String testData = "{\"hive-site\":{\"hive.metastore.warehouse.dir\":\"wasb: + "\"core-site\":{\"fs.AbstractFileSystem.wasbs.impl\":\"org.apache.hadoop.fs.azure.Wasbs\",\"fs.AbstractFileSystem.wasb.impl\"" + ":\"org.apache.hadoop.fs.azure.Wasbs\",\"fs.azure.account.key.mmolnar.blob.core.windows.net\":\"dontshowup\"," + "\"fs.azure.selfthrottling.read.factor\":\"1.0\",\"fs.azure.selfthrottling.write.factor\":\"1.0\"}}"; Assert.assertEquals("{\"hive-site\":{\"hive.metastore.warehouse.dir\":\"wasb: + "\"core-site\":{\"fs.AbstractFileSystem.wasbs.impl\":\"org.apache.hadoop.fs.azure.Wasbs\",\"fs.AbstractFileSystem.wasb.impl\"" + ":\"org.apache.hadoop.fs.azure.Wasbs\",\"fs.azure.account.key.mmolnar.blob.core.windows.net\":\"" + REPLACEMENT + "\"," + "\"fs.azure.selfthrottling.read.factor\":\"1.0\",\"fs.azure.selfthrottling.write.factor\":\"1.0\"}}", anonymize(testData)); }
public static String anonymize(String content) { String ret = content; if (ret != null) { LOGGER.info("Anonymize the content with length: {}", content.length()); for (ReplacePattern pattern : PATTERNS) { ret = pattern.replaceAll(ret); } } return ret; }
AnonymizerUtil { public static String anonymize(String content) { String ret = content; if (ret != null) { LOGGER.info("Anonymize the content with length: {}", content.length()); for (ReplacePattern pattern : PATTERNS) { ret = pattern.replaceAll(ret); } } return ret; } }
AnonymizerUtil { public static String anonymize(String content) { String ret = content; if (ret != null) { LOGGER.info("Anonymize the content with length: {}", content.length()); for (ReplacePattern pattern : PATTERNS) { ret = pattern.replaceAll(ret); } } return ret; } private  AnonymizerUtil(); }
AnonymizerUtil { public static String anonymize(String content) { String ret = content; if (ret != null) { LOGGER.info("Anonymize the content with length: {}", content.length()); for (ReplacePattern pattern : PATTERNS) { ret = pattern.replaceAll(ret); } } return ret; } private  AnonymizerUtil(); static String anonymize(String content); }
AnonymizerUtil { public static String anonymize(String content) { String ret = content; if (ret != null) { LOGGER.info("Anonymize the content with length: {}", content.length()); for (ReplacePattern pattern : PATTERNS) { ret = pattern.replaceAll(ret); } } return ret; } private  AnonymizerUtil(); static String anonymize(String content); static final String REPLACEMENT; }