aboutsummaryrefslogtreecommitdiff
path: root/exec/java-exec/src/main/java/org/apache/drill/exec/work/fragment
AgeCommit message (Collapse)Author
2018-10-19DRILL-6793: FragmentExecutor cannot send its final state for the case when ↵Bohdan Kazydub
RootExec root wasn't initialized closes #1506
2018-10-01DRILL-6724: Dump operator context to logs when error occurs during query ↵Bohdan Kazydub
execution closes #1455
2018-08-28DRILL-6422: Replace guava imports with shaded onesVolodymyr Vysotskyi
2018-08-23DRILL-6385: Support JPPD featureweijie.tong
2018-06-15DRILL-6468: CatastrophicFailures should not do a graceful shutdown of drill ↵Timothy Farkas
when terminating the JVM. closes #1306
2018-05-18DRILL-6255: Drillbit while sending control message to itself creates a ↵Sorabh Hamirwasia
connection instead of submitting locally closes #1253
2018-04-17DRILL-6320: Fixed license headers.Drill Dev
closes #1207
2018-03-29DRILL-6125: Fix possible memory leak when query is cancelled or finished.Timothy Farkas
close apache/drill#1105
2018-03-07DRILL-6151: Fragment executors may terminate without sending final batch to ↵Vlad Rozov
a downstream causing query to hang closes #1151
2018-01-26DRILL-5730: Mock testing improvements and interface improvementsTimothy Farkas
closes #1045
2018-01-11DRILL-5961: For long running queries (> 10 min) Drill may raise ↵Vlad Rozov
FragmentSetupException for completed/cancelled fragments This closes #1041
2017-09-24DRILL-5721: Update based on merge conflict with DRILL-3449Sorabh Hamirwasia
Note: Resolved Merge Conflict and added certain new tests closes #919
2017-09-24DRILL-5721: Query with only root fragment and no non-root fragment hangs ↵Sorabh Hamirwasia
when Drillbit to Drillbit Control Connection has network issues Note: 1) To resolve the issue all the fragments including root fragment which are assigned to be executed on Foreman node are scheduled locally and not sent over Control Tunnel. Also the FragmentStatusReporter is updated to sent the status update locally by fragments running on Foreman node. 2) Refactor for FragmentManager, setupRootFragment and startNewFragment 3) Update the test added for DRILL-5701 as there is change in behavior
2017-09-16DRILL-3449: When Foreman node dies, the FragmentExecutor still tries to send ↵Vlad Rozov
status updates to Foreman closes #934
2017-09-14DRILL-5269 Make DirectSubScan Jackson JSON deserializableVlad Rozov
closes #926
2017-04-07DRILL-5355: Misc. code cleanup closes #784Paul Rogers
2017-02-24DRILL-4280: CORE (bit to bit authentication, control)Sudheesh Katkam
+ Support authentication in ControlServer and ControlClient + Add AuthenticationCommand as an initial command after handshake and before the command that initiates a connection + Add ControlConnectionConfig to encapsulate configuration + ControlMessageHandler now implements RequestHandler control
2017-02-24DRILL-4280: REFACTORSudheesh Katkam
+ Extract RemoteConnection interface, and add AbstractRemoteConnection + Add ServerConnection and ClientConnection interfaces + Add RequestHandler interface to decouple connections from how requests are handled + Add NonTransientRpcException + Remove unused classes and methods + Code style changes
2016-08-09DRILL-4766: FragmentExecutor should use EventProcessor and avoid blocking ↵adeneche
rpc threads closes #561
2016-02-05DRILL-3581: Upgrade to Guava 18.0Jacques Nadeau
- Replace Stopwatch constructors with .createStarted() or .createUnstarted() - Stop using InputSupplier and Closeables.closeQuietly - Clean up quiet closes to log or (preferably) propagate. - Add log4j to enforcer exclusions. - Update HBaseTestSuite to add patching of Closeables.closeQuietly() and Stopwatch legacy methods. Only needed when running HBaseMiniCluster. - Remove log4j from HBase's pom to provide exception logging. - Remove log4j from Hive's shaded pom. - Update Catastrophic failures to use the same pattern to ensure reporting. - Update test framework to avoid trying IPv6 resolution. (This removes 90s pause from HBase startup in my tests) This closes #361. This closes #157.
2015-12-21DRILL-4134: Allocator ImprovementsJacques Nadeau
- make Allocator mostly lockless - change BaseAllocator maps to direct references - add documentation around memory management model - move transfer and ownership methods to DrillBuf - Improve debug messaging. - Fix/revert sort changes - Remove unused fragment limit flag - Add time to HistoricalLog events - Remove reservation amount from RootAllocator constructor (since not allowed) - Fix concurrency issue where allocator is closing at same moment as incoming batch transfer, causing leaked memory and/or query failure. - Add new AutoCloseables.close(Iterable<AutoCloseable>) - Remove extraneous DataResponseHandler and Impl (and update TestBitRpc to use smarter mock of FragmentManager) - Remove the concept of poison pill record batches, using instead FragmentContext.isOverMemoryLimit() - Update incoming data batches so that they are transferred under protection of a close lock - Improve field names in IncomingBuffers and move synchronization to collectors as opposed to IncomingBuffers (also change decrementing to decrementToZero rather than two part check). This closes #238.
2015-11-12DRILL-3987: (REFACTOR) Common and Vector modules building.Jacques Nadeau
- Extract Accountor interface from Implementation - Separate FMPP modules to separate out Vector Needs versus external needs - Separate out Vector classes from those that are VectorAccessible. - Cleanup Memory Exception hiearchy
2015-11-02DRILL-3242: Update RPC layer so that requests and response are managed on a ↵Jacques Nadeau
secondary thread. - Create a separate serialized executor for fragment receiverFinished events. - Update serialized executor to pool object creation. - Ensure that FragmentExecutor acceptExternalEvents countdown occurs when only execution is cancellation.
2015-09-10DRILL-1942-hygieneChris Westin
- Formatting - @Overrides - finals - some AutoCloseable additions - new isCancelled() abstract method on FragmentManager, implemented on subclasses Added missing new abstract method isCancelled() Close apache/drill#120
2015-07-07DRILL-3450: Moved methods from AbstractStatusReporter and ↵Sudheesh Katkam
NonRootStatusReporter to FragmentStatusReporter + Removed StatusReporter interface + Refactored FragmentStatusReporter
2015-07-06DRILL-3096: Fixed logging in FragmentExecutorSudheesh Katkam
2015-06-25DRILL-3147: tpcds-sf1-parquet query 73 causes memory leakadeneche
- each time a fragment A sends a "receiver finished" to fragment B, fragment B id will be added to FragmentContext.ignoredSenders list - refactored UnorderedReceiverBatch.informSenders() and MergingRecordBatch.informSenders() by moving this method to FragmentContext - DataServer.send() uses FragmentContext.ignoredSenders to decide if a batch should be passed to the fragment or discarded right away - BaseRawBatchBuffer methods enqueue() and kill() are now synchronized - TestTpcdsSf1Leak test reproduces the leak, it's ignored by default because it requires a large dataset
2015-06-24DRILL-2903: General improvements to tests in TestDrillbitResilienceSudheesh Katkam
+ Added RepeatTestRule to tests that are flaky + Added Controls.Builder to create controls string in tests + Added @Ignore to failing tests (filed JIRAs) Other fixes: + Added @Override to ScanBatch#close to avoid potential bugs + Added docs link in ProtobufLengthDecoder + Fixed logging issue in CountDownLatchImpl
2015-06-23DRILL-3319: Replaced UserException#build() method with #build(Logger) method ↵Sudheesh Katkam
to log from the correct class + Fixed docs in UserException + Created loggers, and changed logger visibility to private
2015-06-05DRILL-3035: Created ControlsInjector interface to enforce method implementationsSudheesh Katkam
+ DRILL-2867: Add ControlsValidator to VALIDATORS only if assertions are enabled + return in ExecutionControls ctor if assertions are not enabled + added InjectorFactory class to align with the logger pattern
2015-05-14DRILL-3052, DRILL-3066: Improve fragment state management in face of early ↵Jacques Nadeau
cancellation.
2015-05-14DRILL-3063: TestQueriesOnLargeFile leaks memory with 16M limitChris Westin
Changed the cleanup handling at the end of ImplCreator.getExec(), and handle the newly returned null value in FragmentExecutor.run().
2015-05-13DRILL-3079: Move execution fragment json parsing from RPC message to ↵Jacques Nadeau
fragment start.
2015-05-12DRILL-2755: (part2) Use and handle InterruptedException during query processingvkorukanti
2015-05-12DRILL-2780: Check for open files when closing OperatorContextSteven Phillips
2015-05-11DRILL-2977, DRILL-2978: Swap fragment execution method implementations, and ↵Sudheesh Katkam
cancellation changes Execution: In WorkManager, + swap implementations of startFragmentPendingRemote() and addFragmentRunner() + warn if there are running fragments in close() Cancellation: + for fragments waiting on data, delegate cancellations to WorkEventBus (in Foreman and ControlMessageHandler) + documentation
2015-05-10DRILL-2755: Use and handle InterruptedException during query processing.vkorukanti
- Interrupt FragmentExecutor thread as part of FragmentExecutor.cancel() - Handle InterruptedException in ExternalSortBatch.newSV2(). If the fragment status says should not continue, then throw the InterruptedException to caller which returns IterOutcome.STOP - Add comments reg not handling of InterruptedException in SendingAccountor.waitForSendComplete() - Handle InterruptedException in OrderedPartitionRecordBatch.getPartitionVectors() If interrupted in Thread.sleep calls and fragment status says should not run, then return IterOutcome.STOP downstream. - Interrupt partitioner threads if PartitionerRecordBatch is interrupted while waiting for partitioner threads to complete. - Preserve interrupt status if not handled - Handle null RecordBatches returned by RawBatchBuffer.getNext() in MergingRecordBatch.buildSchema() - Change timeout in Foreman to be proportional to the number of intermediate fragments sent instead of hard coded limit of 90s. - Change TimedRunnable to enforce a timeout of 15s per runnable. Total timeout is (5s * numOfRunnableTasks) / parallelism. - Add unit tests * Testing cancelling a query interrupts the query fragments which are currently blocked * Testing interrupting the partitioner sender which in turn interrupts its helper threads * Testing TimedRunanble enforeces timeout for the whole task list.
2015-05-10DRILL-2697: Pauses sites wait indefinitely for a resume signal DrillClient ↵Sudheesh Katkam
sends a resume signal to UserServer. UserServer triggers a resume call in the correct Foreman. Foreman resumes all pauses related to the query through the Control layer. + Better error messages and more tests in TestDrillbitResilience and TestPauseInjection + Added execution controls to operator context + Removed ControlMessageHandler interface, renamed ControlHandlerImpl to ControlMessageHandler + Added CountDownLatchInjection, useful in cases like ParititionedSender that spawns multiple threads
2015-05-10DRILL-2878: FragmentExecutor.closeOutResources() is not called if an ↵adeneche
exception happens in the Foreman before the fragment executor starts running
2015-05-10DRILL-2757: Verify operators correctly handle low memory conditions and ↵adeneche
cancellations includes: DRILL-2816: system error does not display the original Exception message DRILL-2893: ScanBatch throws a NullPointerException instead of returning OUT_OF_MEMORY DRILL-2894: FixedValueVectors shouldn't set it's data buffer to null when it fails to allocate it DRILL-2895: AbstractRecordBatch.buildSchema() should properly handle OUT_OF_MEMORY outcome DRILL-2905: RootExec implementations should properly handle IterOutcome.OUT_OF_MEMORY DRILL-2920: properly handle OutOfMemoryException DRILL-2947: AllocationHelper.allocateNew() doesn't have a consistent behavior when it can't allocate also: - added UserException.memoryError() with a pre assigned error message - injection site in ScanBatch and unit test that runs various tpch queries and injects an exception in the ScanBatch that will cause an OUT_OF_MEMORY outcome to be sent
2015-05-02DRILL-2940, DRILL-2847: Improve Memory CharacteristicsJacques Nadeau
- Update Large Buffer allocation so Drill releases immediately rather than waiting for Garbage Collection - Remove DrillBuf.wrap() and all references to it. - Update Parquet Reader to reduce object churn and indirection. - Add additional metric to memory iterator - Add Large and small buffer metric historgram tracking - Add memory tracking reporter - Update Netty to 4.0.27
2015-05-02DRILL-2826: Simplify and centralize Operator CleanupJacques Nadeau
- Remove cleanup method from RecordBatch interface - Make OperatorContext creation and closing the management of FragmentContext - Make OperatorContext an abstract class and the impl only available to FragmentContext - Make RecordBatch closing the responsibility of the RootExec - Make all closes be suppresing closes to maximize memory release in failure - Add new CloseableRecordBatch interface used by RootExec - Make RootExec AutoCloseable - Update RecordBatchCreator to return CloseableRecordBatches so that RootExec can maintain list - Generate list of operators through change in ImplCreator
2015-04-29DRILL-2898: Update fragment executor to capture OutOfMemory exceptions and ↵Jacques Nadeau
report instead of terminating thread.
2015-04-21DRILL-2514: Add support for impersonation in FileSystem storage plugin.vkorukanti
2015-04-21DRILL-2413: FileSystemPlugin refactoring: avoid sharing DrillFileSystem ↵vkorukanti
across schemas
2015-04-20DRILL-2383: Support to inject exceptions and pauses in various components of ↵Sudheesh Katkam
Drill + Controls are fired only if assertions are enabled + Controls can be introduced in any class that has access to FragmentContext/QueryContext + Controls can be fired by altering the DRILLBIT_CONTROL_INJECTIONS session option + Renames: SimulatedExceptions => ExecutionControls, ExceptionInjector => ExecutionControlsInjector + Added injection sites in Foreman, DrillSqlWorker, FragmentExecutor + Unit tests in TestDrillbitResilience, TestExceptionInjection and TestPauseInjection Other commits included: + DRILL-2437: Moved ExecutionControls from DrillbitContext to FragmentContext/QueryContext + DRILL-2382: Added address and port to Injection to specify drillbit + DRILL-2384: Added QueryState to SingleRowListener and assert that state is COMPLETED while testing Other edits: + Support for short lived session options in SessionOptionManager (using TTL in OptionValidator) + Introduced query count in UserSession + Added QueryState to queryCompleted() in UserResultsListener to check if COMPLETED/CANCELED + Added JSONStringValidator to TypeValidators + Log query id as string in DrillClient, WorkEventBus, QueryResultHandler + Use try..catch block only around else clause for OptionList in FragmentContext + Fixed drillbitContext spelling error in QueryContext + Fixed state transition when cancel() before run() in FragmentExecutor + Do not call setLocalOption twice in FallbackOptionManager + Show explicitly that submitWork() returns queryId in UserServer + Updated protocol/readme.txt to include an alternative way to generate sources
2015-04-18DRILL-2762: Update Fragment state reporting and error collectionJacques Nadeau
DeferredException - Add new throwAndClear operation on to allow checking for exceptions preClose in FragmentContext - Add new getAndClear operation BufferManager - Ensure close() can be called multiple times by clearing managed buffer list on close(). FragmentContext/FragmentExecutor - Update FragmentContext to have a preClose so that we can check closure state before doing final close. - Update so that there is only a single state maintained between FragmentContext and FragmentExecutor - Clean up FragmentExecutor run() method to better manage error states and have only single terminal point (avoiding multiple messages to Foreman). - Add new CANCELLATION_REQUESTED state for FragmentState. - Move all users of isCancelled or isFailed in main code to use shouldContinue() - Update receivingFragmentFinished message to not cancel fragment (only inform root operator of cancellation) WorkManager Updates - Add new afterExecute command to the WorkManager ExecutorService so that we get log entries if a thread leaks an exception. (Otherwise logs don't show these exceptions and they only go to standard out.) Profile Page - Update profile page to show last update and last progress. - Change durations to non-time presentation Foreman/QueryManager - Extract listenable interfaces into anonymous inner classes from body of Foreman QueryManager - Update QueryManager to track completed nodes rather than completed fragments using NodeTracker - Update DrillbitStatusListener to decrement expected completion messages on Nodes that have died to avoid query hang when a node dies FragmentData/MinorFragmentProfile - Add ability to track last status update as well as last time fragment made progress AbstractRecordBatch - Update awareness of current cancellation state to avoid cancellation delays Misc. Other changes - Move ByteCode optimization code to only record assembly and code as trace messages - Update SimpleRootExec to create fake ExecutorState to make existing tests work. - Update sort to exit prematurely in the case that the fragment was asked to cancel. - Add finals to all edited files. - Modify control handler and FragmentManager to directly support receivingFragmentFinished - Update receiver propagation message to avoid premature removal of fragment manager - Update UserException.Builder to log a message if we're creating a new UserException (ERROR for System, INFO otherwise). - Update Profile pages to use min and max instead of sorts.
2015-04-16DRILL-2675 (PART-2): Implement a subset of User Exceptions to improve how ↵adeneche
errors are reported to the user Added missing changes from committed patch
2015-04-15DRILL-2675: Implement a subset of User Exceptions to improve how errors are ↵adeneche
reported to the user
2015-03-26DRILL-2575: FragmentExecutor.cancel() blasts through state transitions ↵Chris Westin
regardless of current state FragmentExecutor: - Changed cancel() to behave asynchronously, and for the cancelation request to be checked at an appropriate place in the run() loop.