Skip to content
This repository has been archived by the owner on Jul 7, 2020. It is now read-only.

Cleanup of error handling in AbstractOutputWriter. #19

Closed
wants to merge 25 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
853263c
Merging spawn javascript minimization script into master.
Feb 5, 2014
c96de2a
Make sure to clear error state after enabling job
Feb 6, 2014
031adc0
[maven-release-plugin]prepare release v4.1.1
addthis-buildbot Feb 6, 2014
85054a7
[maven-release-plugin]prepare for next development iteration
addthis-buildbot Feb 6, 2014
fcb424c
Cleanup of logging level invocations. INFO is for informational errors.
Feb 6, 2014
3dc974a
Implement a new optional lazy loading mechanism for the plugin archit…
Feb 6, 2014
56910c0
[maven-release-plugin] bugfix to hydra 4.1.1. All users should upgrad…
addthis-buildbot Feb 6, 2014
f67c0ea
[maven-release-plugin] bugfix to hydra 4.1.1. All users should upgrad…
addthis-buildbot Feb 6, 2014
21b5f14
Don't update meters based on queries that never actually started.
Feb 7, 2014
b61a10b
fix an array logging statement in SSM
tea-dragon Feb 7, 2014
e64db9a
Adding additional documentation on the parameter 'hard' of the alias …
Feb 7, 2014
6aa279e
Instructions for OS X in README.mdown.
Feb 7, 2014
886bdb1
Adding test for executable commands that are prerequisites
Feb 7, 2014
c493aaf
Improvement to task logging output. Hydra processes units of data cal…
Feb 7, 2014
2b2968a
Adding ability to repair PageDB as a separate utility that can
Feb 10, 2014
2cde442
change log level for oplimit when additional bundles are received
abramsm Feb 10, 2014
def17b4
In the PageDB repair utility if a (key, value) pair in a page
Feb 10, 2014
e111922
inject QueryStatusObserver into more operations so that canceled or c…
abramsm Feb 10, 2014
79f01cd
add QueryStatusObserver to OpHistogram
abramsm Feb 10, 2014
64b2d06
Use cached value for queue size, removing need for sync lock
Feb 10, 2014
78a9f89
prevent NPE when there is no cell operation to perform
abramsm Feb 10, 2014
f6c38ea
Adding 'do not delete' parameter to job configurations that will prev…
Feb 10, 2014
fadbb19
default to PivotOp.SUM for cellop
abramsm Feb 10, 2014
294d41f
Initial cleanup of AbstractOutputWriter. Error messages
Feb 10, 2014
8c285c4
Cleanup of error handling in AbstractOutputWriter. If an
Feb 11, 2014
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Adding ability to repair PageDB as a separate utility that can
be run outside the context of a hydra job. Moving class from
/test to /main in order to make it possible to deploy in executable
jar.
  • Loading branch information
Michael Spiegel committed Feb 11, 2014
commit 2b2968a27eda6e0123dc092fc709b40f4d186a76
Original file line number Diff line number Diff line change
Expand Up @@ -923,14 +923,10 @@ ConcurrentTreeNode getTreeTrashNode() {
return treeTrashNode;
}

/**
* For testing purposes only.
*/
@SuppressWarnings("unused")
void testIntegrity() {
void repairIntegrity() {
PagedKeyValueStore store = source.getEps();
if (store instanceof SkipListCache) {
((SkipListCache) store).testIntegrity(false);
((SkipListCache) store).testIntegrity(true);
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
package com.addthis.hydra.data.tree;

import java.io.File;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class TreeIntegrity {

private static final Logger log = LoggerFactory.getLogger(TreeIntegrity.class);

public static void main(String[] args) {
File root = new File(args[0]);
if (args.length > 1 && args[1].equals("repair")) {
ConcurrentTree tree = null;
try {
tree = new ConcurrentTree(root, false);
tree.repairIntegrity();
} catch (Exception ex) {
log.error(ex.toString());
} finally {
if (tree != null) tree.close();
}
} else {
ReadTree tree = null;
try {
tree = new ReadTree(root);
tree.testIntegrity();
} catch(Exception ex) {
log.error(ex.toString());
} finally {
if (tree != null) tree.close();
}
}
}


}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -715,6 +715,7 @@ public ExternalPagedStoreMetrics getMetrics() {

public void testIntegrity() {
int counter = 0;
int failedPages = 0;
try {
byte[] encodedKey = pages.firstKey();
K key = keyCoder.keyDecode(encodedKey);
Expand All @@ -725,12 +726,14 @@ public void testIntegrity() {
K nextKey = keyCoder.keyDecode(encodedNextKey);
K nextFirstKey = newPage.getNextFirstKey();
if (nextFirstKey == null) {
failedPages++;
log.warn("On page " + counter + " the firstKey is " +
newPage.getFirstKey() +
" the nextFirstKey is null" +
" and the next page is associated with key " + nextKey);
assert(false);
} else if (!nextFirstKey.equals(nextKey)) {
failedPages++;
int compareTo = compareKeys(nextFirstKey, nextKey);
char direction = compareTo > 0 ? '>' : '<';
log.warn("On page " + counter + " the firstKey is " +
Expand All @@ -744,13 +747,13 @@ public void testIntegrity() {
encodedKey = encodedNextKey;
counter++;
if (counter % 10000 == 0) {
log.info("Scanned " + counter + " pages.");
log.info("Scanned " + counter + " pages. Detected " + failedPages + " failed pages.");
}
} while (encodedKey != null);
} catch (ExecutionException ex) {
log.error(ex.toString());
}
log.info("Scanned " + counter + " pages.");
log.info("Scan complete. Scanned " + counter + " pages. Detected " + failedPages + " failed pages.");
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -2259,7 +2259,7 @@ public int testIntegrity(boolean repair) {
}
}
log.info("Scan complete. Scanned " + counter + " pages. Detected " + failedPages + " failed pages.");
return failedPages;
return repair ? 0 : failedPages;
}

}