|
||||
0001 /** 0002 * Licensed to the Apache Software Foundation (ASF) under one 0003 * or more contributor license agreements. See the NOTICE file 0004 * distributed with this work for additional information 0005 * regarding copyright ownership. The ASF licenses this file 0006 * to you under the Apache License, Version 2.0 (the 0007 * "License"); you may not use this file except in compliance 0008 * with the License. You may obtain a copy of the License at 0009 * 0010 * http://www.apache.org/licenses/LICENSE-2.0 0011 * 0012 * Unless required by applicable law or agreed to in writing, software 0013 * distributed under the License is distributed on an "AS IS" BASIS, 0014 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 0015 * See the License for the specific language governing permissions and 0016 * limitations under the License. 0017 */ 0018 0019 package org.apache.hive.service.cli.operation; 0020 0021 import java.util.HashSet; 0022 import java.util.Set; 0023 0024 import org.apache.hadoop.hive.metastore.TableType; 0025 0026 /** 0027 * HiveTableTypeMapping. 0028 * Default table type mapping 0029 * 0030 */ 0031 public class HiveTableTypeMapping implements TableTypeMapping { 0032 0033 @Override 0034 public String[] mapToHiveType(String clientTypeName) { 0035 return new String[] {mapToClientType(clientTypeName)}; 0036 } 0037 0038 @Override 0039 public String mapToClientType(String hiveTypeName) { 0040 return hiveTypeName; 0041 } 0042 0043 @Override 0044 public Set<String> getTableTypeNames() { 0045 Set<String> typeNameSet = new HashSet<String>(); 0046 for (TableType typeNames : TableType.values()) { 0047 typeNameSet.add(typeNames.name()); 0048 } 0049 return typeNameSet; 0050 } 0051 }
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.1.0 LXR engine. The LXR team |