Skip to content

Commit

Permalink
Remove PrestoClusterManager
Browse files Browse the repository at this point in the history
  • Loading branch information
sopel39 committed Jun 8, 2020
1 parent 0afa8be commit 0f9c1e4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 119 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import com.qubole.rubix.prestosql.CachingPrestoS3FileSystem;
import com.qubole.rubix.prestosql.CachingPrestoSecureAzureBlobFileSystem;
import com.qubole.rubix.prestosql.CachingPrestoSecureNativeAzureFileSystem;
import com.qubole.rubix.prestosql.PrestoClusterManager;
import io.airlift.log.Logger;
import io.airlift.units.Duration;
import io.prestosql.plugin.base.CatalogName;
Expand Down Expand Up @@ -60,7 +61,6 @@
import static com.qubole.rubix.spi.CacheConfig.setEmbeddedMode;
import static com.qubole.rubix.spi.CacheConfig.setIsParallelWarmupEnabled;
import static com.qubole.rubix.spi.CacheConfig.setOnMaster;
import static com.qubole.rubix.spi.CacheConfig.setPrestoClusterManager;
import static io.prestosql.plugin.hive.DynamicConfigurationProvider.setCacheKey;
import static io.prestosql.plugin.hive.util.ConfigurationUtils.getInitialConfiguration;
import static io.prestosql.plugin.hive.util.RetryDriver.DEFAULT_SCALE_FACTOR;
Expand Down Expand Up @@ -232,6 +232,7 @@ private void startRubix()
LocalDataTransferServer.startServer(configuration, metricRegistry, bookKeeper);

CachingFileSystem.setLocalBookKeeper(bookKeeper, "catalog=" + catalogName);
PrestoClusterManager.setNodeManager(nodeManager);
log.info("Rubix initialized successfully");
cacheReady = true;
}
Expand All @@ -241,6 +242,7 @@ private void setupRubixMetrics()
Configuration configuration = getRubixServerConfiguration();
new BookKeeperServer().setupServer(configuration, new MetricRegistry());
CachingFileSystem.setLocalBookKeeper(null, "catalog=" + catalogName);
PrestoClusterManager.setNodeManager(nodeManager);
}

private Configuration getRubixServerConfiguration()
Expand Down Expand Up @@ -288,10 +290,6 @@ void updateRubixConfiguration(Configuration config)

config.set("fs.hdfs.impl", RUBIX_DISTRIBUTED_FS_CLASS_NAME);

// TODO: fix PrestoClusterManager in Rubix itself
PrestoClusterManager.setNodeManager(nodeManager);
setPrestoClusterManager(config, PrestoClusterManager.class.getName());

extraConfigInitializer.ifPresent(initializer -> initializer.initializeConfiguration(config));
}
}

0 comments on commit 0f9c1e4

Please sign in to comment.