You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2017/05/17 09:11:16 UTC

[Bug 60567] XSSFReader caused OutOfMemoryError when reading a large excel file in HDFS as inputStream

https://bz.apache.org/bugzilla/show_bug.cgi?id=60567

chenchanghan <ch...@huawei.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|3.14-FINAL                  |3.15-FINAL
                 OS|Linux                       |Windows 7

--- Comment #3 from chenchanghan <ch...@huawei.com> ---
I encounter the same question. 700,000 rows, size:139M
I find use OPCPackage.open(inputStream) will get OutOfMemoryError,But use
OPCPackage.open(filePath) run very well.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


Re: [Bug 60567] XSSFReader caused OutOfMemoryError when reading a large excel file in HDFS as inputStream

Posted by "pj.fanning" <fa...@yahoo.com>.
OPCPackage.open(file) is more efficient memory wise than
OPCPackage.open(inputStream)

	/**
	 * Open a package.
	 *
	 * Note - uses quite a bit more memory than {@link #open(String)}, which
	 * doesn't need to hold the whole zip file in memory, and can take
advantage
	 * of native methods
	 *
	 * @param in
	 *            The InputStream to read the package from
	 * @return A PackageBase object
	 */
	public static OPCPackage open(InputStream in) throws
InvalidFormatException,
			IOException {



--
View this message in context: http://apache-poi.1045710.n5.nabble.com/Bug-60567-New-XSSFReader-caused-OutOfMemoryError-when-reading-a-lerge-excel-file-in-HDFS-as-inputStrm-tp5726184p5727624.html
Sent from the POI - Dev mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org