|
||||
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; 0020 0021 /** 0022 * FetchType indicates the type of fetchResults request. 0023 * It maps the TFetchType, which is generated from Thrift interface. 0024 */ 0025 public enum FetchType { 0026 QUERY_OUTPUT((short)0), 0027 LOG((short)1); 0028 0029 private final short tFetchType; 0030 0031 FetchType(short tFetchType) { 0032 this.tFetchType = tFetchType; 0033 } 0034 0035 public static FetchType getFetchType(short tFetchType) { 0036 for (FetchType fetchType : values()) { 0037 if (tFetchType == fetchType.toTFetchType()) { 0038 return fetchType; 0039 } 0040 } 0041 return QUERY_OUTPUT; 0042 } 0043 0044 public short toTFetchType() { 0045 return tFetchType; 0046 } 0047 }
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.1.0 LXR engine. The LXR team |