I am getting this error in my mapper class . I am reading big zip file using ZipFileInputFormat that will unzip and using ZipFileRecordReader i am converting it in key as file name and content of the file as value .I have to split the content using my delimiter and insert it into HBase table . Size of the zip file is very huge and its not split able . My code is working for the smaller zip file but when i run this for huge zip file it throw this error . This is where problem occurs.
// Read the file contents
ByteArrayOutputStream bos = new ByteArrayOutputStream();
byte[] temp = new byte[8192];
while ( true )
{
int bytesRead = 0;
try
{
bytesRead = zip.read( temp, 0, 8192 );
}
catch ( EOFException e )
{
if ( ZipFileInputFormat.getLenient() == false )
throw e;
return false;
}
if ( bytesRead > 0 )
bos.write( temp, 0, bytesRead );
else
break;
}
I tried increasing 8192 to some big number but then also same error .
This is how i run my mapreduce .
hadoop jar bulkupload-1.0-jar-with-dependencies.jar -Dmapreduce.map.memory.mb=8192 -Dmapreduce.map.java.opts=Xmx7372m FinancialLineItem FinancialLineItem sudarshan/output3
9
In my mapper code i iterate over content of the file then split it and then insert into HBase .
NOTE:File size is very huge .