List of usage examples for java.lang InternalError InternalError
public InternalError(Throwable cause)
From source file:org.eclipse.dataset.IntegerDataset.java
@SuppressWarnings({ "unchecked" }) @Override/*from w w w . j a v a 2 s .c o m*/ public int[] minPos(boolean ignoreInvalids) { if (storedValues == null || storedValues.isEmpty()) { calculateMaxMin(ignoreInvalids, ignoreInvalids); } String n = storeName(ignoreInvalids, ignoreInvalids, STORE_MIN_POS); Object o = storedValues.get(n); List<int[]> min = null; if (o == null) { min = findPositions(min(ignoreInvalids).intValue()); // PRIM_TYPE // min = findPositions(min(false).intValue() != 0); // BOOLEAN_USE // min = findPositions(null); // OBJECT_USE storedValues.put(n, min); } else if (o instanceof List<?>) { min = (List<int[]>) o; } else { throw new InternalError("Inconsistent internal state of stored values for statistics calculation"); } return min.get(0); // first minimum }
From source file:org.apache.tajo.storage.FileTablespace.java
@Override public void purgeTable(TableDesc tableDesc) throws IOException { try {//from w w w.ja v a 2 s . co m Path path = new Path(tableDesc.getUri()); FileSystem fs = path.getFileSystem(conf); LOG.info("Delete table data dir: " + path); fs.delete(path, true); } catch (IOException e) { throw new InternalError(e.getMessage()); } }
From source file:org.eclipse.dataset.DoubleDataset.java
@SuppressWarnings({ "unchecked" }) @Override//from ww w. j ava 2s . c o m public int[] maxPos(boolean ignoreInvalids) { if (storedValues == null || storedValues.isEmpty()) { calculateMaxMin(ignoreInvalids, ignoreInvalids); } String n = storeName(ignoreInvalids, ignoreInvalids, STORE_MAX_POS); Object o = storedValues.get(n); List<int[]> max = null; if (o == null) { max = findPositions(max(ignoreInvalids).doubleValue()); // PRIM_TYPE // NAN_OMIT // max = findPositions(max(false).intValue() != 0); // BOOLEAN_USE // max = findPositions(null); // OBJECT_USE storedValues.put(n, max); } else if (o instanceof List<?>) { max = (List<int[]>) o; } else { throw new InternalError("Inconsistent internal state of stored values for statistics calculation"); } return max.get(0); // first maximum }
From source file:com.clustercontrol.jobmanagement.dialog.JobKickDialog.java
/** * ??????/*ww w. ja v a2 s . co m*/ * */ private void reflectJobManual() { //??? if (this.m_mode == PropertyDefineConstant.MODE_MODIFY || this.m_mode == PropertyDefineConstant.MODE_COPY) { this.m_jobKick = GetJobKick.getJobManual(this.m_managerName, this.m_jobkickId); } else { this.m_jobKick = new JobKick(); } if (this.m_jobKick == null) { throw new InternalError("JobManual is null"); } // ??? reflectJobKick(); }
From source file:org.eclipse.dataset.FloatDataset.java
@SuppressWarnings({ "unchecked" }) @Override//from ww w .java2 s . com public int[] minPos(boolean ignoreInvalids) { if (storedValues == null || storedValues.isEmpty()) { calculateMaxMin(ignoreInvalids, ignoreInvalids); } String n = storeName(ignoreInvalids, ignoreInvalids, STORE_MIN_POS); Object o = storedValues.get(n); List<int[]> min = null; if (o == null) { min = findPositions(min(ignoreInvalids).floatValue()); // PRIM_TYPE // min = findPositions(min(false).intValue() != 0); // BOOLEAN_USE // min = findPositions(null); // OBJECT_USE storedValues.put(n, min); } else if (o instanceof List<?>) { min = (List<int[]>) o; } else { throw new InternalError("Inconsistent internal state of stored values for statistics calculation"); } return min.get(0); // first minimum }
From source file:org.eclipse.dataset.DoubleDataset.java
@SuppressWarnings({ "unchecked" }) @Override/*from ww w . jav a2s .co m*/ public int[] minPos(boolean ignoreInvalids) { if (storedValues == null || storedValues.isEmpty()) { calculateMaxMin(ignoreInvalids, ignoreInvalids); } String n = storeName(ignoreInvalids, ignoreInvalids, STORE_MIN_POS); Object o = storedValues.get(n); List<int[]> min = null; if (o == null) { min = findPositions(min(ignoreInvalids).doubleValue()); // PRIM_TYPE // NAN_OMIT // min = findPositions(min(false).intValue() != 0); // BOOLEAN_USE // min = findPositions(null); // OBJECT_USE storedValues.put(n, min); } else if (o instanceof List<?>) { min = (List<int[]>) o; } else { throw new InternalError("Inconsistent internal state of stored values for statistics calculation"); } return min.get(0); // first minimum }
From source file:com.marklogic.xcc.ValueFactory.java
private static XdmNode newNodeValue(ValueType valueType, Object value) { if (valueType == ValueType.ELEMENT) { return newElement(value); }//from w ww . j a v a 2s . c om if (valueType == ValueType.NODE) { return newElement(value); } if (valueType == ValueType.OBJECT_NODE) { return newObjectNode(value); } if (valueType == ValueType.NULL_NODE) { return newNullNode(value); } if (valueType == ValueType.BOOLEAN_NODE) { return newBooleanNode(value); } if (valueType == ValueType.ARRAY_NODE) { return newArrayNode(value); } if (valueType == ValueType.NUMBER_NODE) { return newNumberNode(value); } if (valueType == ValueType.TEXT) { return newTextNode(value); } if (valueType == ValueType.BINARY) { return newBinaryNode(value); } /* TODO: ? if (valueType == ValueType.ATTRIBUTE) { return newAttributeNode(value); } */ if (valueType == ValueType.COMMENT) { return newCommentNode(value); } if (valueType == ValueType.DOCUMENT) { return newDocumentNode(value); } if (valueType == ValueType.PROCESSING_INSTRUCTION) { return newProcessingInstructionNode(value); } throw new InternalError("Unrecognized valueType: " + valueType); }
From source file:org.apache.tajo.storage.FileStorageManager.java
@Override public void purgeTable(TableDesc tableDesc) throws IOException { try {// w ww . j a v a2 s . c o m Path path = new Path(tableDesc.getPath()); FileSystem fs = path.getFileSystem(conf); LOG.info("Delete table data dir: " + path); fs.delete(path, true); } catch (IOException e) { throw new InternalError(e.getMessage()); } }
From source file:edu.ku.brc.af.auth.UserAndMasterPasswordMgr.java
/** * Returns the instance to the singleton * @return the instance to the singleton */// w w w.j a v a 2 s . c om public static UserAndMasterPasswordMgr getInstance() { if (instance != null) { return instance; } // else String factoryNameStr = AccessController.doPrivileged(new java.security.PrivilegedAction<String>() { public String run() { return System.getProperty(factoryName); } }); if (isNotEmpty(factoryNameStr)) { try { return instance = (UserAndMasterPasswordMgr) Class.forName(factoryNameStr).newInstance(); } catch (Exception e) { edu.ku.brc.af.core.UsageTracker.incrHandledUsageCount(); edu.ku.brc.exceptions.ExceptionTracker.getInstance().capture(UserAndMasterPasswordMgr.class, e); InternalError error = new InternalError( "Can't instantiate UserAndMasterPasswordMgr factory " + factoryNameStr); //$NON-NLS-1$ error.initCause(e); throw error; } } return instance = new UserAndMasterPasswordMgr(); }
From source file:com.uber.stream.kafka.mirrormaker.manager.core.ControllerHelixManager.java
private String getHostname(String instanceId) { Map<String, String> instanceIdAndNameMap = HelixUtils.getInstanceToHostnameMap(_helixManager); String hostname = instanceIdAndNameMap.containsKey(instanceId) ? instanceIdAndNameMap.get(instanceId) : ""; if (StringUtils.isEmpty(hostname)) { throw new InternalError(String.format("Failed to find hostname for instanceId %s", instanceId)); }/*from w w w . ja v a 2 s. co m*/ return hostname; }