Package backtype.storm.topology

Examples of backtype.storm.topology.FailedException


    public void updateState(List<TridentTuple> tuples, TridentCollector tridentCollector){
        try{
            this.options.execute(tuples);
        } catch (IOException e){
            LOG.warn("Failing batch due to IOException.", e);
            throw new FailedException(e);
        }
    }
View Full Code Here


        try {
            hBaseClient.batchMutate(mutations);
        } catch (Exception e) {
            LOG.warn("Batch write failed but some requests might have succeeded. Triggering replay.", e);
            throw new FailedException(e);
        }
    }
View Full Code Here

                List<Values> values = options.rowToStormValueMapper.toValues(tuple, result);
                batchRetrieveResult.add(values);
            }
        } catch (Exception e) {
            LOG.warn("Batch get operation failed. Triggering replay.", e);
            throw new FailedException(e);
        }
        return batchRetrieveResult;
    }
View Full Code Here

                } else {
                    retval.add(null);
                }
            }
        } catch(IOException e){
            throw new FailedException("IOException while reading from HBase.", e);
        }
        return retval;
    }
View Full Code Here

            puts.add(put);
        }
        try {
            this.table.put(puts);
        } catch (InterruptedIOException e) {
            throw new FailedException("Interrupted while writing to HBase", e);
        } catch (RetriesExhaustedWithDetailsException e) {
            throw new FailedException("Retries exhaused while writing to HBase", e);
        }
    }
View Full Code Here

    public void onException(Exception e, TridentCollector collector) {
        switch (actionFor(e)) {
            case FAIL_TUPLE:
                LOG.info("Failing batch based on registered exception " + e.getClass().getName() + ", Message: '"
                        + e.getMessage() + "'", e);
                throw new FailedException(e);
            case REPORT_ERROR:
                LOG.info(
                        "Reporting error based on registered exception " + e.getClass().getName() + ", Message: '"
                                + e.getMessage() + "'", e);
                if(collector != null){
View Full Code Here

            LOG.error("Skipping tuple: " + tuple, e);
        } catch (StormCassandraException e) {
            LOG.error("Failed to write tuple. Exception: " + e.getLocalizedMessage());
            // This will tell storm to replay the whole batch
            // TODO should we add a number of retry here?
            throw new FailedException();
        } catch (Exception e) {
            LOG.error("Unexcepted exception: " + e.getLocalizedMessage());
            // unexpected error should not be replayed. Log only
            collector.reportError(e);
        }
View Full Code Here

        } catch (Exception e) {
            if (this.exceptionHandler != null) {
                this.exceptionHandler.onException(e, collector);
            } else {
                LOG.warn("Batch write failed. Triggering replay.", e);
                throw new FailedException(e);
            }
        }
    }
View Full Code Here

            } catch (Exception e) {
                if (this.exceptionHandler != null) {
                    this.exceptionHandler.onException(e, null);
                } else {
                    LOG.warn("Cassandra lookup failed. Triggering replay.", e);
                    throw new FailedException(e);
                }
            }

        }
        return retval;
View Full Code Here

                }
            } catch (Exception ex) {
                String errorMsg = "Could not send message with key = " + mapper.getKeyFromTuple(tuple)
                        + " to topic = " + topic;
                LOG.warn(errorMsg, ex);
                throw new FailedException(errorMsg, ex);
            }
        }
    }
View Full Code Here

TOP

Related Classes of backtype.storm.topology.FailedException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.