forked from senseidb/bobo
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bobo-contrib: Fix for occassionally corrupt geo index; Catch the erro…
…r when writing geo segment, attempt to repair, and log additional information if we cannot
- Loading branch information
Showing
8 changed files
with
221 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
...ib/src/main/java/com/browseengine/bobo/geosearch/index/impl/InvalidTreeSizeException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package com.browseengine.bobo.geosearch.index.impl; | ||
|
||
/** | ||
* | ||
* This exception indicates that the size of the compact binary tree, | ||
* does not match the number of elements actually written to it. | ||
* | ||
* @author Geoff Cooney | ||
* | ||
*/ | ||
public class InvalidTreeSizeException extends Exception { | ||
private static final long serialVersionUID = -586521581062650233L; | ||
private final int treeSize; | ||
private final int recordSize; | ||
|
||
public InvalidTreeSizeException(int treeSize, int recordSize) { | ||
super("Explicit tree size(" + treeSize + ") does not match the number of records attempted to be written to the tree(" | ||
+ recordSize + ")"); | ||
this.treeSize = treeSize; | ||
this.recordSize = recordSize; | ||
} | ||
|
||
/** | ||
* @return The explicit size of the tree that this exception was generated for | ||
*/ | ||
public int getTreeSize() { | ||
return treeSize; | ||
} | ||
|
||
/** | ||
* @return The actual number of records in the tree this exception was generated for | ||
*/ | ||
public int getRecordSize() { | ||
return recordSize; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.