ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akuznet...@apache.org
Subject [3/3] incubator-ignite git commit: Merge branches 'ignite-45' and 'sprint-2' of https://git-wip-us.apache.org/repos/asf/incubator-ignite into ignite-45
Date Wed, 18 Mar 2015 02:55:45 GMT
Merge branches 'ignite-45' and 'sprint-2' of https://git-wip-us.apache.org/repos/asf/incubator-ignite
into ignite-45

Conflicts:
	modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheQueryConfiguration.java


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/ae3144ef
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/ae3144ef
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/ae3144ef

Branch: refs/heads/ignite-45
Commit: ae3144ef19039815c2dae22d2071a485dbc95d60
Parents: dab080d 3eca5e7
Author: AKuznetsov <akuznetsov@gridgain.com>
Authored: Wed Mar 18 09:55:29 2015 +0700
Committer: AKuznetsov <akuznetsov@gridgain.com>
Committed: Wed Mar 18 09:55:29 2015 +0700

----------------------------------------------------------------------
 .../visor/cache/VisorCacheConfiguration.java    | 20 --------------------
 .../visor/cache/VisorCacheMetadataTask.java     |  1 -
 .../cache/VisorCacheMetricsCollectorTask.java   |  1 -
 .../cache/VisorCacheQueryConfiguration.java     |  5 +----
 .../visor/cache/VisorCacheRebalanceTask.java    |  1 -
 .../visor/cache/VisorCacheResetMetricsTask.java |  1 -
 .../visor/cache/VisorCacheSwapBackupsTask.java  |  1 -
 .../commands/cache/VisorCacheCommand.scala      | 14 ++++++++------
 8 files changed, 9 insertions(+), 35 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ae3144ef/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheConfiguration.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ae3144ef/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheRebalanceTask.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheRebalanceTask.java
index dec598f,0000000..b1ef0c3
mode 100644,000000..100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheRebalanceTask.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheRebalanceTask.java
@@@ -1,83 -1,0 +1,82 @@@
 +/*
 + * Licensed to the Apache Software Foundation (ASF) under one or more
 + * contributor license agreements.  See the NOTICE file distributed with
 + * this work for additional information regarding copyright ownership.
 + * The ASF licenses this file to You under the Apache License, Version 2.0
 + * (the "License"); you may not use this file except in compliance with
 + * the License.  You may obtain a copy of the License at
 + *
 + *      http://www.apache.org/licenses/LICENSE-2.0
 + *
 + * Unless required by applicable law or agreed to in writing, software
 + * distributed under the License is distributed on an "AS IS" BASIS,
 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 + * See the License for the specific language governing permissions and
 + * limitations under the License.
 + */
 +
 +package org.apache.ignite.internal.visor.cache;
 +
 +import org.apache.ignite.*;
- import org.apache.ignite.cache.*;
 +import org.apache.ignite.internal.*;
 +import org.apache.ignite.internal.processors.cache.*;
 +import org.apache.ignite.internal.processors.task.*;
 +import org.apache.ignite.internal.util.typedef.internal.*;
 +import org.apache.ignite.internal.visor.*;
 +
 +import java.util.*;
 +
 +/**
 + * Pre-loads caches. Made callable just to conform common pattern.
 + */
 +@GridInternal
 +public class VisorCacheRebalanceTask extends VisorOneNodeTask<Set<String>, Void>
{
 +    /** */
 +    private static final long serialVersionUID = 0L;
 +
 +    /** {@inheritDoc} */
 +    @Override protected VisorCachesRebalanceJob job(Set<String> arg) {
 +        return new VisorCachesRebalanceJob(arg, debug);
 +    }
 +
 +    /**
 +     * Job that rebalance caches.
 +     */
 +    private static class VisorCachesRebalanceJob extends VisorJob<Set<String>,
Void> {
 +        /** */
 +        private static final long serialVersionUID = 0L;
 +
 +        /**
 +         * @param arg Caches names.
 +         * @param debug Debug flag.
 +         */
 +        private VisorCachesRebalanceJob(Set<String> arg, boolean debug) {
 +            super(arg, debug);
 +        }
 +
 +        /** {@inheritDoc} */
 +        @Override protected Void run(Set<String> cacheNames) {
 +            try {
 +                Collection<IgniteInternalFuture<?>> futs = new ArrayList<>();
 +
 +                for (GridCache c : ignite.cachesx()) {
 +                    if (cacheNames.contains(c.name()))
 +                        futs.add(c.forceRepartition());
 +                }
 +
 +                for (IgniteInternalFuture f : futs)
 +                    f.get();
 +
 +                return null;
 +            }
 +            catch (IgniteCheckedException e) {
 +                throw U.convertException(e);
 +            }
 +        }
 +
 +        /** {@inheritDoc} */
 +        @Override public String toString() {
 +            return S.toString(VisorCachesRebalanceJob.class, this);
 +        }
 +    }
 +}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ae3144ef/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/cache/VisorCacheCommand.scala
----------------------------------------------------------------------


Mime
View raw message