blob: 857d04e91bad8b207fb573a4b55528ede6768126 [file] [log] [blame]
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF 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 org.apache.drill.metastore.components.tables;
import org.apache.drill.metastore.metadata.MetadataType;
import org.apache.drill.metastore.operate.MetadataTypeValidator;
import org.apache.drill.shaded.guava.com.google.common.collect.ImmutableSet;
import java.util.Set;
/**
* Implementation of {@link MetadataTypeValidator} interface which provides
* list of supported metadata types for Metastore Tables component.
*/
public class TablesMetadataTypeValidator implements MetadataTypeValidator {
public static final TablesMetadataTypeValidator INSTANCE = new TablesMetadataTypeValidator();
private static final Set<MetadataType> SUPPORTED_METADATA_TYPES = ImmutableSet.of(
MetadataType.ALL,
MetadataType.TABLE,
MetadataType.SEGMENT,
MetadataType.FILE,
MetadataType.ROW_GROUP,
MetadataType.PARTITION);
@Override
public Set<MetadataType> supportedMetadataTypes() {
return SUPPORTED_METADATA_TYPES;
}
}