当前位置: 首页>>代码示例>>Java>>正文


Java U.error方法代码示例

本文整理汇总了Java中org.apache.ignite.internal.util.typedef.internal.U.error方法的典型用法代码示例。如果您正苦于以下问题:Java U.error方法的具体用法?Java U.error怎么用?Java U.error使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.ignite.internal.util.typedef.internal.U的用法示例。


在下文中一共展示了U.error方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: logExchange

import org.apache.ignite.internal.util.typedef.internal.U; //导入方法依赖的package包/类
/**
 * Log exchange event.
 *
 * @param evt Discovery event.
 */
private void logExchange(DiscoveryEvent evt) {
    if (cctx.kernalContext().state().publicApiActiveState(false) && cctx.wal() != null) {
        if (((FileWriteAheadLogManager)cctx.wal()).serializerVersion() > 1)
            try {
                ExchangeRecord.Type type = null;

                if (evt.type() == EVT_NODE_JOINED)
                    type = ExchangeRecord.Type.JOIN;
                else if (evt.type() == EVT_NODE_LEFT || evt.type() == EVT_NODE_FAILED)
                    type = ExchangeRecord.Type.LEFT;

                BaselineTopology blt = cctx.kernalContext().state().clusterState().baselineTopology();

                if (type != null && blt != null) {
                    Short constId = blt.consistentIdMapping().get(evt.eventNode().consistentId());

                    if (constId != null)
                        cctx.wal().log(new ExchangeRecord(constId, type));
                }
            }
            catch (IgniteCheckedException e) {
                U.error(log, "Fail during log exchange record.", e);
            }
    }
}
 
开发者ID:apache,项目名称:ignite,代码行数:31,代码来源:GridDhtPartitionsExchangeFuture.java

示例2: evictAll

import org.apache.ignite.internal.util.typedef.internal.U; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override public void evictAll(Collection<? extends K> keys) {
    A.notNull(keys, "keys");

    if (F.isEmpty(keys))
        return;

    if (keyCheck)
        validateCacheKey(keys);

    GridCacheVersion obsoleteVer = ctx.versions().next();

    try {
        ctx.evicts().batchEvict(keys, obsoleteVer);
    }
    catch (IgniteCheckedException e) {
        U.error(log, "Failed to perform batch evict for keys: " + keys, e);
    }
}
 
开发者ID:apache,项目名称:ignite,代码行数:20,代码来源:GridCacheAdapter.java

示例3: sendNearUpdateReply

import org.apache.ignite.internal.util.typedef.internal.U; //导入方法依赖的package包/类
/**
 * @param nodeId Originating node ID.
 * @param res Near update response.
 */
private void sendNearUpdateReply(UUID nodeId, GridNearAtomicUpdateResponse res) {
    try {
        ctx.io().send(nodeId, res, ctx.ioPolicy());

        if (msgLog.isDebugEnabled())
            msgLog.debug("Sent near update response [futId=" + res.futureId() + ", node=" + nodeId + ']');
    }
    catch (ClusterTopologyCheckedException ignored) {
        if (msgLog.isDebugEnabled()) {
            msgLog.debug("Failed to send near update response [futId=" + res.futureId() +
                ", node=" + nodeId + ']');
        }
    }
    catch (IgniteCheckedException e) {
        U.error(msgLog, "Failed to send near update response [futId=" + res.futureId() +
            ", node=" + nodeId + ", res=" + res + ']', e);
    }
}
 
开发者ID:apache,项目名称:ignite,代码行数:23,代码来源:GridDhtAtomicCache.java

示例4: marshalData

import org.apache.ignite.internal.util.typedef.internal.U; //导入方法依赖的package包/类
/**
 * @param src Source.
 * @param target Target.
 * @param marsh Marsh.
 * @param log Logger.
 */
private void marshalData(
        Map<Integer, Serializable> src,
        Map<Integer, byte[]> target,
        Marshaller marsh,
        IgniteLogger log
) {
    //may happen if nothing was collected from components,
    // corresponding map (for common data or for node specific data) left null
    if (src == null)
        return;

    for (Map.Entry<Integer, Serializable> entry : src.entrySet()) {
        try {
            target.put(entry.getKey(), marsh.marshal(entry.getValue()));
        }
        catch (IgniteCheckedException e) {
            U.error(log, "Failed to marshal discovery data " +
                    "[comp=" + entry.getKey() + ", data=" + entry.getValue() + ']', e);
        }
    }
}
 
开发者ID:apache,项目名称:ignite,代码行数:28,代码来源:DiscoveryDataPacket.java

示例5: removeQueryResult

import org.apache.ignite.internal.util.typedef.internal.U; //导入方法依赖的package包/类
/**
 * @param sndId Sender node ID.
 * @param reqId Request ID.
 */
@SuppressWarnings("SynchronizationOnLocalVariableOrMethodParameter")
protected void removeQueryResult(@Nullable UUID sndId, long reqId) {
    if (sndId == null)
        return;

    RequestFutureMap futs = qryIters.get(sndId);

    if (futs != null) {
        IgniteInternalFuture<QueryResult<K, V>> fut;

        synchronized (futs) {
            fut = futs.remove(reqId);
        }

        if (fut != null) {
            try {
                fut.get().closeIfNotShared(recipient(sndId, reqId));
            }
            catch (IgniteCheckedException e) {
                if (!X.hasCause(e, GridDhtUnreservedPartitionException.class))
                    U.error(log, "Failed to close iterator.", e);
            }
        }
    }
}
 
开发者ID:apache,项目名称:ignite,代码行数:30,代码来源:GridCacheQueryManager.java

示例6: startManager

import org.apache.ignite.internal.util.typedef.internal.U; //导入方法依赖的package包/类
/**
 * @param mgr Manager to start.
 * @throws IgniteCheckedException Throw in case of any errors.
 */
private void startManager(GridManager mgr) throws IgniteCheckedException {
    // Add manager to registry before it starts to avoid cases when manager is started
    // but registry does not have it yet.
    ctx.add(mgr);

    try {
        if (!skipDaemon(mgr))
            mgr.start();
    }
    catch (IgniteCheckedException e) {
        U.error(log, "Failed to start manager: " + mgr, e);

        throw new IgniteCheckedException("Failed to start manager: " + mgr, e);
    }
}
 
开发者ID:apache,项目名称:ignite,代码行数:20,代码来源:IgniteKernal.java

示例7: registerMBean

import org.apache.ignite.internal.util.typedef.internal.U; //导入方法依赖的package包/类
/**
 * Try to register MBean.
 */
private void registerMBean() {
    if (U.IGNITE_MBEANS_DISABLED)
        return;

    try {
        ObjectName objName = U.registerMBean(
            ManagementFactory.getPlatformMBeanServer(),
            "Router",
            "TCP Router " + id,
            getClass().getSimpleName(),
            this,
            GridTcpRouterMBean.class);

        if (log.isDebugEnabled())
            log.debug("Registered MBean: " + objName);

        mbeanName = objName;
    }
    catch (JMException e) {
        U.error(log, "Failed to register MBean.", e);
    }
}
 
开发者ID:apache,项目名称:ignite,代码行数:26,代码来源:GridTcpRouterImpl.java

示例8: onDmlResponse

import org.apache.ignite.internal.util.typedef.internal.U; //导入方法依赖的package包/类
/**
 * Process response for DML request.
 *
 * @param node Node.
 * @param msg Message.
 */
private void onDmlResponse(final ClusterNode node, GridH2DmlResponse msg) {
    try {
        long reqId = msg.requestId();

        DistributedUpdateRun r = updRuns.get(reqId);

        if (r == null) {
            U.warn(log, "Unexpected dml response (will ignore). [localNodeId=" + ctx.localNodeId() + ", nodeId=" +
                node.id() + ", msg=" + msg.toString() + ']');

            return;
        }

        r.handleResponse(node.id(), msg);
    }
    catch (Exception e) {
        U.error(log, "Error in dml response processing. [localNodeId=" + ctx.localNodeId() + ", nodeId=" +
            node.id() + ", msg=" + msg.toString() + ']', e);
    }
}
 
开发者ID:apache,项目名称:ignite,代码行数:27,代码来源:GridReduceQueryExecutor.java

示例9: releaseHistoryForExchange

import org.apache.ignite.internal.util.typedef.internal.U; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override public synchronized void releaseHistoryForExchange() {
    if (reservedForExchange == null)
        return;

    for (Map.Entry<Integer, Map<Integer, T2<Long, WALPointer>>> e : reservedForExchange.entrySet()) {
        for (Map.Entry<Integer, T2<Long, WALPointer>> e0 : e.getValue().entrySet()) {
            try {
                cctx.wal().release(e0.getValue().get2());
            }
            catch (IgniteCheckedException ex) {
                U.error(log, "Could not release history lock", ex);
            }
        }
    }

    reservedForExchange = null;
}
 
开发者ID:apache,项目名称:ignite,代码行数:19,代码来源:GridCacheDatabaseSharedManager.java

示例10: body

import org.apache.ignite.internal.util.typedef.internal.U; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override protected void body() throws InterruptedException {
    while (!isCancelled()) {
        try {
            body0();
        }
        catch (InterruptedException e) {
            throw e;
        }
        catch (Throwable t) {
            U.error(log, "Unexpected exception in discovery worker thread (ignored).", t);

            if (t instanceof Error)
                throw (Error)t;
        }
    }
}
 
开发者ID:apache,项目名称:ignite,代码行数:18,代码来源:GridDiscoveryManager.java

示例11: body

import org.apache.ignite.internal.util.typedef.internal.U; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override protected void body() throws InterruptedException, IgniteInterruptedCheckedException {
    Throwable err = null;

    try {
        processPartitions(parts, clo, remainder);
    }
    catch (Throwable e) {
        err = e;

        U.error(log, "Error during parallel index create/rebuild.", e);

        stop = true;
    }
    finally {
        fut.onDone(err);
    }
}
 
开发者ID:apache,项目名称:ignite,代码行数:19,代码来源:SchemaIndexCacheVisitorImpl.java

示例12: handleAsync

import org.apache.ignite.internal.util.typedef.internal.U; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override public IgniteInternalFuture<GridRestResponse> handleAsync(GridRestRequest req) {
    try {
        return handleAsyncUnsafe(req);
    }
    catch (IgniteCheckedException e) {
        if (!X.hasCause(e, VisorClusterGroupEmptyException.class))
            U.error(log, "Failed to execute task command: " + req, e);

        return new GridFinishedFuture<>(e);
    }
    finally {
        if (log.isDebugEnabled())
            log.debug("Handled task REST request: " + req);
    }
}
 
开发者ID:apache,项目名称:ignite,代码行数:17,代码来源:GridTaskCommandHandler.java

示例13: sendResponseOnFailedMessage

import org.apache.ignite.internal.util.typedef.internal.U; //导入方法依赖的package包/类
/**
 * Sends response on failed message.
 *
 * @param nodeId node id.
 * @param res response.
 * @param cctx shared context.
 * @param plc grid io policy.
 */
private void sendResponseOnFailedMessage(UUID nodeId, GridCacheMessage res, GridCacheSharedContext cctx,
    byte plc) {
    try {
        cctx.io().send(nodeId, res, plc);
    }
    catch (IgniteCheckedException e) {
        U.error(log, "Failed to send response to node (is node still alive?) [nodeId=" + nodeId +
            ",res=" + res + ']', e);
    }
}
 
开发者ID:apache,项目名称:ignite,代码行数:19,代码来源:GridCacheIoManager.java

示例14: finishColocatedLocal

import org.apache.ignite.internal.util.typedef.internal.U; //导入方法依赖的package包/类
/**
 * @param commit Commit flag (rollback if {@code false}).
 * @param tx Transaction to commit.
 * @return Future.
 */
public IgniteInternalFuture<IgniteInternalTx> finishColocatedLocal(boolean commit, GridNearTxLocal tx) {
    try {
        if (commit) {
            if (!tx.markFinalizing(USER_FINISH)) {
                if (log.isDebugEnabled())
                    log.debug("Will not finish transaction (it is handled by another thread): " + tx);

                return null;
            }

            return tx.commitAsyncLocal();
        }
        else
            return tx.rollbackAsyncLocal();
    }
    catch (Throwable e) {
        U.error(log, "Failed completing transaction [commit=" + commit + ", tx=" + tx + ']', e);

        if (e instanceof Error)
            throw e;

        if (tx != null)
            try {
                return tx.rollbackNearTxLocalAsync();
            }
            catch (Throwable e1) {
                e.addSuppressed(e1);
            }

        return new GridFinishedFuture<>(e);
    }
}
 
开发者ID:apache,项目名称:ignite,代码行数:38,代码来源:IgniteTxHandler.java

示例15: handleAttributeUpdateException

import org.apache.ignite.internal.util.typedef.internal.U; //导入方法依赖的package包/类
/**
 * Log error and delegate processing to {@link #handleCacheOperationException(Exception)}.
 *
 * @param sesId Session ID.
 * @param tryCnt Try count.
 * @param e Exception to process.
 */
private void handleAttributeUpdateException(final String sesId, final int tryCnt, final RuntimeException e) {
    if (tryCnt == retries - 1) {
        U.error(log, "Failed to apply updates for session (maximum number of retries exceeded) [sesId=" +
            sesId + ", retries=" + retries + ']', e);
    }
    else {
        U.warn(log, "Failed to apply updates for session (will retry): " + sesId);

        handleCacheOperationException(e);
    }
}
 
开发者ID:apache,项目名称:ignite,代码行数:19,代码来源:WebSessionFilter.java


注:本文中的org.apache.ignite.internal.util.typedef.internal.U.error方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。