---
title: "hadoop file output 报 java.lang.OutOfMemoryError: Requested array size exceeds VM"
author: "zsg86"
date: "2017-10-09T17:21:06Z"
tags: []
categories: ["开源软件"]
slug: "hadoop-file-output-java-lang-outofmemoryerror-requested-array-size-exceeds-vm"
draft: false
lastmod: "2017-10-09T17:21:06Z"
id: 2395582
url: "https://zsg86.iteye.com/blog/2395582"
---

使用kettle将hive中的数据抽取到hdfs中，报 java.lang.OutOfMemoryError: Requested array size exceeds VM  
![](http://dl2.iteye.com/upload/attachment/0127/2747/592058c0-881b-3b9e-a1d2-7e90af10911f.png)  
 

原因是，hive中有两个字段定义的长度为21亿，超过了jvm数据长度，减小这两个字段长度即可。

   
![](http://dl2.iteye.com/upload/attachment/0127/2749/e595991a-f94f-3f45-a30f-9f48b7b17588.png)