atom feed4 messages in org.apache.orc.issues[jira] [Commented] (ORC-43) FileMemor...
FromSent OnAttachments
ASF GitHub Bot (JIRA)Feb 23, 2016 2:23 pm 
ASF GitHub Bot (JIRA)Feb 25, 2016 5:36 am 
ASF GitHub Bot (JIRA)Feb 25, 2016 5:36 am 
ASF GitHub Bot (JIRA)Feb 25, 2016 8:09 am 
Subject:[jira] [Commented] (ORC-43) FileMemory.cc throws uncaught exception
From:ASF GitHub Bot (JIRA) (ji@apache.org)
Date:Feb 25, 2016 8:09:49 am
List:org.apache.orc.issues

[
https://issues.apache.org/jira/browse/ORC-43?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15167455#comment-15167455
]

ASF GitHub Bot commented on ORC-43:

-----------------------------------

Github user omalley commented on a diff in the pull request:

https://github.com/apache/orc/pull/19#discussion_r54128437

--- Diff: tools/src/FileMemory.cc --- @@ -95,37 +127,11 @@ int main(int argc, char* argv[]) { return 1; }

- orc::ReaderOptions opts; - if (cols.size() > 0) { - opts.include(cols); - } - std::unique_ptr<orc::MemoryPool> pool(new TestMemoryPool()); - opts.setMemoryPool(*(pool.get())); - - std::unique_ptr<orc::Reader> reader; - try{ - reader = orc::createReader(orc::readLocalFile(std::string(filename)),
opts); - } catch (orc::ParseError e) { - std::cout << "Error reading file " << filename << "! " << e.what() <<
"\n"; - return -1; - } - - std::unique_ptr<orc::ColumnVectorBatch> batch = - reader->createRowBatch(batchSize); - uint64_t readerMemory = reader->getMemoryUse(); - uint64_t batchMemory = batch->getMemoryUsage(); - while (reader->next(*batch)) {} - uint64_t actualMemory = - static_cast<TestMemoryPool*>(pool.get())->getMaxMemory(); - std::cout << "Reader memory estimate: " << readerMemory - << "\nBatch memory estimate: " ; - if (batch->hasVariableLength()) { - std::cout << "Cannot estimate because reading ARRAY or MAP columns"; - } else { - std::cout << batchMemory - << "\nTotal memory estimate: " << readerMemory +
batchMemory; + try { + processFile(filename, cols, batchSize); + return 0; + } catch (std::exception& ex) { + std::cerr << "Caught exception: " << ex.what() << "\n"; + return 1; } - std::cout << "\nActual max memory used: " << actualMemory << "\n"; - - return 0; --- End diff --

gcc and clang are both fine with it at -Wall.

FileMemory.cc throws uncaught exception

---------------------------------------

Key: ORC-43 URL: https://issues.apache.org/jira/browse/ORC-43 Project: Orc Issue Type: Bug Components: tools Affects Versions: 1.0.0 Reporter: Owen O'Malley Assignee: Owen O'Malley Fix For: 1.0.1

I ran a Coverity scan over ORC 1.0.0 and it found an issue in FileMemory where
exceptions aren't be caught.