forked from voldemort/voldemort
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added monitoring (JMX) for fat client wrapper, netty server and req…
…uest handler * Fixed some bugs and cleanup * Added unit tests for dynamic timeout store and REST API validation
- Loading branch information
Chinmay Soman
committed
Apr 26, 2013
1 parent
6ca2f83
commit e6e9e7e
Showing
24 changed files
with
1,127 additions
and
213 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
package voldemort.coordinator; | ||
|
||
import java.util.concurrent.RejectedExecutionException; | ||
import java.util.concurrent.atomic.AtomicLong; | ||
|
||
import voldemort.VoldemortException; | ||
import voldemort.annotations.jmx.JmxGetter; | ||
import voldemort.store.InsufficientOperationalNodesException; | ||
import voldemort.store.InsufficientZoneResponsesException; | ||
import voldemort.store.InvalidMetadataException; | ||
import voldemort.store.routed.PipelineRoutedStats; | ||
|
||
/** | ||
* Class to keep track of all the errors in the Coordinator service | ||
* | ||
*/ | ||
public class CoordinatorErrorStats extends PipelineRoutedStats { | ||
|
||
CoordinatorErrorStats() { | ||
super(); | ||
this.errCountMap.put(RejectedExecutionException.class, new AtomicLong(0)); | ||
this.errCountMap.put(IllegalArgumentException.class, new AtomicLong(0)); | ||
this.errCountMap.put(VoldemortException.class, new AtomicLong(0)); | ||
} | ||
|
||
@Override | ||
public boolean isSevere(Exception ve) { | ||
if(ve instanceof InsufficientOperationalNodesException | ||
|| ve instanceof InsufficientZoneResponsesException | ||
|| ve instanceof InvalidMetadataException || ve instanceof RejectedExecutionException | ||
|| ve instanceof IllegalArgumentException || ve instanceof VoldemortException) | ||
return true; | ||
else | ||
return false; | ||
} | ||
|
||
@JmxGetter(name = "numRejectedExecutionExceptions", description = "Number of rejected tasks by the Fat client") | ||
public long getNumRejectedExecutionExceptions() { | ||
return errCountMap.get(RejectedExecutionException.class).get(); | ||
} | ||
|
||
@JmxGetter(name = "numIllegalArgumentExceptions", description = "Number of bad requests received by the Coordinator") | ||
public long getNumIllegalArgumentExceptions() { | ||
return errCountMap.get(IllegalArgumentException.class).get(); | ||
} | ||
|
||
@JmxGetter(name = "numVoldemortExceptions", description = "Number of failed Voldemort operations") | ||
public long getNumVoldemortExceptions() { | ||
return errCountMap.get(VoldemortException.class).get(); | ||
} | ||
|
||
} |
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.