adding druid.db.tables.xxx renames and druid.db.connectory.*validation* from ConvertProperties

This commit is contained in:
Himanshu Gupta 2015-05-01 19:40:08 -05:00
parent 8722f4cc18
commit aa10626b61
2 changed files with 57 additions and 1 deletions

View File

@ -68,7 +68,16 @@ public class ConvertProperties implements Runnable
new Rename("druid.db.connector.connectURI", "druid.metadata.storage.connector.connectURI"),
new Rename("druid.db.connector.user", "druid.metadata.storage.connector.user"),
new Rename("druid.db.connector.password", "druid.metadata.storage.connector.password"),
new Remove("druid.db.connector.validationQuery"),
new Remove("druid.db.connector.useValidationQuery"),
new Rename("druid.db.connector.createTables", "druid.metadata.storage.connector.createTables"),
new Rename("druid.db.tables.base", "druid.metadata.storage.tables.base"),
new Rename("druid.db.tables.configTable", "druid.metadata.storage.tables.configTable"),
new Rename("druid.db.tables.segmentTable", "druid.metadata.storage.tables.segmentTable"),
new Rename("druid.db.tables.ruleTable", "druid.metadata.storage.tables.ruleTable"),
new Rename("druid.db.tables.taskLock", "druid.metadata.storage.tables.taskLock"),
new Rename("druid.db.tables.tasks", "druid.metadata.storage.tables.tasks"),
new Rename("druid.db.tables.taskLog", "druid.metadata.storage.tables.taskLog"),
new PropertyConverter()
{
// Add a new config for metadata storage type, and update property name
@ -124,7 +133,7 @@ public class ConvertProperties implements Runnable
);
}
catch (IOException e) {
throw com.google.api.client.repackaged.com.google.common.base.Throwables.propagate(e);
throw Throwables.propagate(e);
}
coordinates.addAll(oldCoordinates);
coordinates.add(String.format("io.druid.extensions:%s-metadata-storage", parseJdbcUrl(jdbcUrl)));

View File

@ -0,0 +1,47 @@
/*
* Licensed to Metamarkets Group Inc. (Metamarkets) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. Metamarkets licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package io.druid.cli.convert;
import com.google.common.collect.ImmutableMap;
import java.util.Map;
import java.util.Properties;
public class Remove implements PropertyConverter
{
private final String propertyToRemove;
public Remove(String propertyToRemove)
{
this.propertyToRemove = propertyToRemove;
}
@Override
public boolean canHandle(String property)
{
return this.propertyToRemove.equals(property);
}
@Override
public Map<String, String> convert(Properties properties)
{
return ImmutableMap.of();
}
}