summaryrefslogtreecommitdiff
path: root/ambari-server/src/main/resources/stacks/HDP/2.2/services/HIVE/configuration/hive-env.xml
blob: 87adb4baa8ea0e9f7b14fd337504313f30e71956 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<!--
/**
 * 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.
 */
-->

<configuration supports_adding_forbidden="true">
  <property>
    <name>hive.heapsize</name>
    <value>512</value>
    <description>Hive Java heap size</description>
    <display-name>HiveServer2 Heap Size</display-name>
    <value-attributes>
      <type>int</type>
      <minimum>512</minimum>
      <maximum>2048</maximum>
      <unit>MB</unit>
      <increment-step>512</increment-step>
      <overridable>false</overridable>
    </value-attributes>
  </property>

  <!-- hive-env.sh -->
  <property>
    <name>content</name>
    <description>This is the jinja template for hive-env.sh file</description>
    <value>
 if [ "$SERVICE" = "cli" ]; then
   if [ -z "$DEBUG" ]; then
     export HADOOP_OPTS="$HADOOP_OPTS -XX:NewRatio=12 -XX:MaxHeapFreeRatio=40 -XX:MinHeapFreeRatio=15 -XX:+UseNUMA -XX:+UseParallelGC -XX:-UseGCOverheadLimit"
   else
     export HADOOP_OPTS="$HADOOP_OPTS -XX:NewRatio=12 -XX:MaxHeapFreeRatio=40 -XX:MinHeapFreeRatio=15 -XX:-UseGCOverheadLimit"
   fi
 fi

# The heap size of the jvm stared by hive shell script can be controlled via:

if [ "$SERVICE" = "metastore" ]; then
  export HADOOP_HEAPSIZE={{hive_metastore_heapsize}} # Setting for HiveMetastore
else
  export HADOOP_HEAPSIZE={{hive_heapsize}} # Setting for HiveServer2 and Client
fi

export HADOOP_CLIENT_OPTS="$HADOOP_CLIENT_OPTS  -Xmx${HADOOP_HEAPSIZE}m"

# Larger heap size may be required when running queries over large number of files or partitions.
# By default hive shell scripts use a heap size of 256 (MB).  Larger heap size would also be
# appropriate for hive server (hwi etc).


# Set HADOOP_HOME to point to a specific hadoop install directory
HADOOP_HOME=${HADOOP_HOME:-{{hadoop_home}}}

# Hive Configuration Directory can be controlled by:
export HIVE_CONF_DIR={{hive_config_dir}}

# Folder containing extra libraries required for hive compilation/execution can be controlled by:
if [ "${HIVE_AUX_JARS_PATH}" != "" ]; then
  if [ -f "${HIVE_AUX_JARS_PATH}" ]; then    
    export HIVE_AUX_JARS_PATH=${HIVE_AUX_JARS_PATH}
  elif [ -d "/usr/hdp/current/hive-webhcat/share/hcatalog" ]; then
    export HIVE_AUX_JARS_PATH=/usr/hdp/current/hive-webhcat/share/hcatalog/hive-hcatalog-core.jar
  fi
elif [ -d "/usr/hdp/current/hive-webhcat/share/hcatalog" ]; then
  export HIVE_AUX_JARS_PATH=/usr/hdp/current/hive-webhcat/share/hcatalog/hive-hcatalog-core.jar
fi      

export METASTORE_PORT={{hive_metastore_port}}

    </value>
    <value-attributes>
      <type>content</type>
    </value-attributes>
  </property>

  <property>
    <name>hive_exec_orc_storage_strategy</name>
    <display-name>ORC Storage Strategy</display-name>
    <value>SPEED</value>
    <value-attributes>
      <type>value-list</type>
      <entries>
        <entry>
          <value>SPEED</value>
          <label>Speed</label>
        </entry>
        <entry>
          <value>COMPRESSION</value>
          <label>Compression</label>
        </entry>
      </entries>
      <selection-cardinality>1</selection-cardinality>
    </value-attributes>
  </property>

  <property>
    <name>hive_txn_acid</name>
    <display-name>ACID Transactions</display-name>
    <value>off</value>
    <value-attributes>
      <type>value-list</type>
      <entries>
        <entry>
          <value>on</value>
          <label>On</label>
        </entry>
        <entry>
          <value>off</value>
          <label>Off</label>
        </entry>
      </entries>
      <selection-cardinality>1</selection-cardinality>
    </value-attributes>
  </property>

  <property>
    <name>cost_based_optimizer</name>
    <display-name>Cost Based Optimizer</display-name>
    <value>Off</value>
    <value-attributes>
      <type>value-list</type>
      <entries>
        <entry>
          <value>On</value>
          <label>On</label>
        </entry>
        <entry>
          <value>Off</value>
          <label>Off</label>
        </entry>
      </entries>
      <selection-cardinality>1</selection-cardinality>
    </value-attributes>
  </property>

  <property>
    <name>hive_security_authorization</name>
    <display-name>Choose Authorization</display-name>
    <value>None</value>
    <depends-on>
      <property>
        <type>ranger-env</type>
        <name>ranger-hive-plugin-enabled</name>
      </property>
    </depends-on>
    <value-attributes>
      <type>value-list</type>
      <entries>
        <entry>
          <value>None</value>
          <label>None</label>
        </entry>
        <entry>
          <value>SQLStdAuth</value>
          <label>SQLStdAuth</label>
        </entry>
        <entry>
          <value>Ranger</value>
          <label>Ranger</label>
        </entry>
      </entries>
    </value-attributes>
  </property>

  <property>
    <name>hive_timeline_logging_enabled</name>
    <display-name>Use ATS Logging</display-name>
    <value>true</value>
    <value-attributes>
      <type>value-list</type>
      <entries>
        <entry>
          <value>true</value>
          <label>True</label>
        </entry>
        <entry>
          <value>false</value>
          <label>False</label>
        </entry>
      </entries>
      <selection-cardinality>1</selection-cardinality>
    </value-attributes>
  </property>

</configuration>