Package com.persistit.AlertMonitor

Examples of com.persistit.AlertMonitor.Event


                    continue;
                }
                pageAddress = readPageBufferFromJournal(stablePageNode, bb);
            } catch (PersistitException ioe) {
                _persistit.getAlertMonitor().post(
                        new Event(AlertLevel.ERROR, _persistit.getLogBase().copyException, ioe, volume, pageNode
                                .getPageAddress(), pageNode.getJournalAddress()), AlertMonitor.JOURNAL_CATEGORY);
                throw ioe;
            }

            Debug.$assert0.t(pageAddress == pageNode.getPageAddress());
View Full Code Here


                    handle = pageNode.getVolumeHandle();
                }
            }
            if (volume == null) {
                _persistit.getAlertMonitor().post(
                        new Event(AlertLevel.WARN, _persistit.getLogBase().missingVolume, volumeRef, pageNode
                                .getJournalAddress()), AlertMonitor.MISSING_VOLUME_CATEGORY);
                if (_ignoreMissingVolume.get()) {
                    _persistit.getLogBase().lostPageFromMissingVolume.log(pageNode.getPageAddress(), volumeRef,
                            pageNode.getJournalAddress());
                    // Not removing the page from the List here will cause
View Full Code Here

         */
        int journalFileCount = getJournalFileCount();
        if (journalFileCount != _lastReportedJournalFileCount) {
            if (journalFileCount > TOO_MANY_ERROR_THRESHOLD) {
                _persistit.getAlertMonitor()
                        .post(new Event(AlertLevel.ERROR, _persistit.getLogBase().tooManyJournalFilesError,
                                journalFileCount), AlertMonitor.MANY_JOURNAL_FILES);
            } else if (journalFileCount > TOO_MANY_WARN_THRESHOLD) {
                _persistit.getAlertMonitor()
                        .post(new Event(AlertLevel.WARN, _persistit.getLogBase().tooManyJournalFilesWarning,
                                journalFileCount), AlertMonitor.MANY_JOURNAL_FILES);
            } else {
                _persistit.getAlertMonitor().post(
                        new Event(AlertLevel.NORMAL, _persistit.getLogBase().normalJournalFileCount, journalFileCount),
                        AlertMonitor.MANY_JOURNAL_FILES);
            }
            _lastReportedJournalFileCount = journalFileCount;
        }
    }
View Full Code Here

                } catch (Exception e) {
                    if (e instanceof InterruptedException || e instanceof FatalErrorException) {
                        _closed.set(true);
                    } else if (e instanceof PersistitException) {
                        _persistit.getAlertMonitor().post(
                                new Event(AlertLevel.ERROR, _persistit.getLogBase().journalWriteError, e,
                                        addressToFile(_writeBufferAddress), addressToOffset(_writeBufferAddress)),
                                AlertMonitor.JOURNAL_CATEGORY);
                    } else {
                        _persistit.getLogBase().journalWriteError.log(e, addressToFile(_writeBufferAddress),
                                addressToOffset(_writeBufferAddress));
View Full Code Here

            try {
                action.performAction(_persistit);
                _performed.incrementAndGet();
            } catch (PersistitException e) {
                lastException(e);
                _persistit.getAlertMonitor().post(new Event(AlertLevel.ERROR, _persistit.getLogBase().cleanupException, e, action),
                        AlertMonitor.CLEANUP_CATEGORY);
                _errors.incrementAndGet();
            }
        }
    }
View Full Code Here

                    /*
                     * If ignoreMissingVolumes is enabled, then issue a warning
                     * Alert, but allow recovery or rollback to continue.
                     */
                    db.getAlertMonitor().post(
                            new Event(AlertLevel.WARN, db.getLogBase().missingVolume, mve.getVolumeName(), address
                                    + position - start), AlertMonitor.MISSING_VOLUME_CATEGORY);
                    ignoredUpdates.incrementAndGet();
                } else {
                    failedUpdates.incrementAndGet();
                    throw mve;
View Full Code Here

                _persistit.getIOMeter().chargeReadPageFromVolume(this._volume, buffer.getPageAddress(),
                        buffer.getBufferSize(), buffer.getIndex());
                _volume.getStatistics().bumpReadCounter();
            } catch (IOException ioe) {
                _persistit.getAlertMonitor().post(
                        new Event(AlertLevel.ERROR, _persistit.getLogBase().readException, ioe, _volume, page, buffer
                                .getIndex()), AlertMonitor.READ_PAGE_CATEGORY);
                throw new PersistitIOException(ioe);
            }
        } finally {
            release();
View Full Code Here

            try {
                getChannel().write(bb, (page - 1) * pageSize);

            } catch (IOException ioe) {
                _persistit.getAlertMonitor().post(
                        new Event(AlertLevel.ERROR, _persistit.getLogBase().writeException, ioe, _volume, page),
                        AlertMonitor.WRITE_PAGE_CATEGORY);
                throw new PersistitIOException(ioe);
            }
        } finally {
            release();
View Full Code Here

            for (final Tree tree : trees) {
                storeTreeStatistics(tree);
            }
        } catch (Exception e) {
            _persistit.getAlertMonitor().post(
                    new Event(AlertLevel.ERROR, _persistit.getLogBase().adminFlushException, e),
                    AlertMonitor.FLUSH_STATISTICS_CATEGORY);
        }
    }
View Full Code Here

                    /*
                     * If ignoreMissingVolumes is enabled, then issue a warning
                     * Alert, but allow recovery or rollback to continue.
                     */
                    db.getAlertMonitor().post(
                            new Event(AlertLevel.WARN, db.getLogBase().missingVolume, vnfe.getMessage(), address
                                    + position - start), AlertMonitor.MISSING_VOLUME_CATEGORY);
                    ignoredUpdates.incrementAndGet();
                } else {
                    failedUpdates.incrementAndGet();
                    throw vnfe;
View Full Code Here

TOP

Related Classes of com.persistit.AlertMonitor.Event

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.