forked from D-Net/dnet-hadoop
added more logging
This commit is contained in:
parent
cba9c2b7cc
commit
7da24c1dec
|
@ -75,9 +75,14 @@ public class DHPUtils {
|
||||||
|
|
||||||
final HttpGet req = new HttpGet(url);
|
final HttpGet req = new HttpGet(url);
|
||||||
|
|
||||||
|
log.info("MDStoreManager request: {}", req);
|
||||||
|
|
||||||
try (final CloseableHttpClient client = HttpClients.createDefault()) {
|
try (final CloseableHttpClient client = HttpClients.createDefault()) {
|
||||||
try (final CloseableHttpResponse response = client.execute(req)) {
|
try (final CloseableHttpResponse response = client.execute(req)) {
|
||||||
final String json = IOUtils.toString(response.getEntity().getContent());
|
final String json = IOUtils.toString(response.getEntity().getContent());
|
||||||
|
|
||||||
|
log.info("MDStoreManager response: {}", json);
|
||||||
|
|
||||||
final MDStoreWithInfo[] mdstores = objectMapper.readValue(json, MDStoreWithInfo[].class);
|
final MDStoreWithInfo[] mdstores = objectMapper.readValue(json, MDStoreWithInfo[].class);
|
||||||
return Arrays
|
return Arrays
|
||||||
.stream(mdstores)
|
.stream(mdstores)
|
||||||
|
|
|
@ -65,11 +65,19 @@ public class MigrateHdfsMdstoresApplication extends AbstractMigrationApplication
|
||||||
log.info("isSparkSessionManaged: {}", isSparkSessionManaged);
|
log.info("isSparkSessionManaged: {}", isSparkSessionManaged);
|
||||||
|
|
||||||
final String mdstoreManagerUrl = parser.get("mdstoreManagerUrl");
|
final String mdstoreManagerUrl = parser.get("mdstoreManagerUrl");
|
||||||
|
log.info("mdstoreManagerUrl: {}", mdstoreManagerUrl);
|
||||||
|
|
||||||
final String mdFormat = parser.get("mdFormat");
|
final String mdFormat = parser.get("mdFormat");
|
||||||
|
log.info("mdFormat: {}", mdFormat);
|
||||||
|
|
||||||
final String mdLayout = parser.get("mdLayout");
|
final String mdLayout = parser.get("mdLayout");
|
||||||
|
log.info("mdLayout: {}", mdLayout);
|
||||||
|
|
||||||
final String mdInterpretation = parser.get("mdInterpretation");
|
final String mdInterpretation = parser.get("mdInterpretation");
|
||||||
|
log.info("mdInterpretation: {}", mdInterpretation);
|
||||||
|
|
||||||
final String hdfsPath = parser.get("hdfsPath");
|
final String hdfsPath = parser.get("hdfsPath");
|
||||||
|
log.info("hdfsPath: {}", hdfsPath);
|
||||||
|
|
||||||
final Set<String> paths = mdstorePaths(mdstoreManagerUrl, mdFormat, mdLayout, mdInterpretation);
|
final Set<String> paths = mdstorePaths(mdstoreManagerUrl, mdFormat, mdLayout, mdInterpretation);
|
||||||
|
|
||||||
|
@ -95,6 +103,8 @@ public class MigrateHdfsMdstoresApplication extends AbstractMigrationApplication
|
||||||
.filter(p -> HdfsSupport.exists(p, sc.hadoopConfiguration()))
|
.filter(p -> HdfsSupport.exists(p, sc.hadoopConfiguration()))
|
||||||
.toArray(size -> new String[size]);
|
.toArray(size -> new String[size]);
|
||||||
|
|
||||||
|
log.info("Processing existing paths {}", Arrays.asList(validPaths));
|
||||||
|
|
||||||
if (validPaths.length > 0) {
|
if (validPaths.length > 0) {
|
||||||
spark
|
spark
|
||||||
.read()
|
.read()
|
||||||
|
|
Loading…
Reference in New Issue