You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by vo...@apache.org on 2016/06/05 14:42:52 UTC
[7/7] ignite git commit: WIP.
WIP.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/a2086bfc
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/a2086bfc
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/a2086bfc
Branch: refs/heads/ignite-3246
Commit: a2086bfc8dc2259800d75c33abac3ad6ffcfa980
Parents: cc66dc3
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Sun Jun 5 17:42:31 2016 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Sun Jun 5 17:42:31 2016 +0300
----------------------------------------------------------------------
.../igfs/client/IgfsClientDeleteCallable.java | 83 ---------------
.../igfs/client/IgfsClientExistsCallable.java | 76 -------------
.../igfs/client/IgfsClientFileIdsCallable.java | 79 --------------
.../igfs/client/IgfsClientMkdirsCallable.java | 106 -------------------
4 files changed, 344 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/a2086bfc/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/client/IgfsClientDeleteCallable.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/client/IgfsClientDeleteCallable.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/client/IgfsClientDeleteCallable.java
deleted file mode 100644
index 9b0095a..0000000
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/client/IgfsClientDeleteCallable.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * 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.processors.igfs.client;
-
-import org.apache.ignite.binary.BinaryObjectException;
-import org.apache.ignite.binary.BinaryRawReader;
-import org.apache.ignite.binary.BinaryRawWriter;
-import org.apache.ignite.igfs.IgfsPath;
-import org.apache.ignite.internal.processors.igfs.IgfsContext;
-import org.apache.ignite.internal.util.typedef.internal.S;
-import org.jetbrains.annotations.Nullable;
-
-/**
- * IGFS client file IDs callable.
- */
-public class IgfsClientDeleteCallable extends IgfsClientAbstractCallable<Boolean> {
- /** */
- private static final long serialVersionUID = 0L;
-
- /** Path. */
- private IgfsPath path;
-
- /** Recursion flag. */
- private boolean recursive;
-
- /**
- * Default constructor.
- */
- public IgfsClientDeleteCallable() {
- // NO-op.
- }
-
- /**
- * Constructor.
- *
- * @param igfsName IGFS name.
- * @param path Path.
- * @param recursive Recursive flag.
- */
- public IgfsClientDeleteCallable(@Nullable String igfsName, IgfsPath path, boolean recursive) {
- super(igfsName);
-
- this.path = path;
- this.recursive = recursive;
- }
-
- /** {@inheritDoc} */
- @Override protected Boolean call0(IgfsContext ctx) throws Exception {
- return ctx.igfs().delete(path, recursive);
- }
-
- /** {@inheritDoc} */
- @Override public void writeBinary0(BinaryRawWriter writer) throws BinaryObjectException {
- writer.writeObject(path);
- writer.writeBoolean(recursive);
- }
-
- /** {@inheritDoc} */
- @Override public void readBinary0(BinaryRawReader reader) throws BinaryObjectException {
- path = reader.readObject();
- recursive = reader.readBoolean();
- }
-
- /** {@inheritDoc} */
- @Override public String toString() {
- return S.toString(IgfsClientDeleteCallable.class, this);
- }
-}
http://git-wip-us.apache.org/repos/asf/ignite/blob/a2086bfc/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/client/IgfsClientExistsCallable.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/client/IgfsClientExistsCallable.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/client/IgfsClientExistsCallable.java
deleted file mode 100644
index adef2db..0000000
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/client/IgfsClientExistsCallable.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * 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.processors.igfs.client;
-
-import org.apache.ignite.binary.BinaryObjectException;
-import org.apache.ignite.binary.BinaryRawReader;
-import org.apache.ignite.binary.BinaryRawWriter;
-import org.apache.ignite.igfs.IgfsPath;
-import org.apache.ignite.internal.processors.igfs.IgfsContext;
-import org.apache.ignite.internal.util.typedef.internal.S;
-import org.jetbrains.annotations.Nullable;
-
-/**
- * IGFS client file IDs callable.
- */
-public class IgfsClientExistsCallable extends IgfsClientAbstractCallable<Boolean> {
- /** */
- private static final long serialVersionUID = 0L;
-
- /** Path. */
- private IgfsPath path;
-
- /**
- * Default constructor.
- */
- public IgfsClientExistsCallable() {
- // NO-op.
- }
-
- /**
- * Constructor.
- *
- * @param igfsName IGFS name.
- * @param path Path.
- */
- public IgfsClientExistsCallable(@Nullable String igfsName, IgfsPath path) {
- super(igfsName);
-
- this.path = path;
- }
-
- /** {@inheritDoc} */
- @Override protected Boolean call0(IgfsContext ctx) throws Exception {
- return ctx.igfs().exists(path);
- }
-
- /** {@inheritDoc} */
- @Override public void writeBinary0(BinaryRawWriter writer) throws BinaryObjectException {
- writer.writeObject(path);
- }
-
- /** {@inheritDoc} */
- @Override public void readBinary0(BinaryRawReader reader) throws BinaryObjectException {
- path = reader.readObject();
- }
-
- /** {@inheritDoc} */
- @Override public String toString() {
- return S.toString(IgfsClientExistsCallable.class, this);
- }
-}
http://git-wip-us.apache.org/repos/asf/ignite/blob/a2086bfc/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/client/IgfsClientFileIdsCallable.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/client/IgfsClientFileIdsCallable.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/client/IgfsClientFileIdsCallable.java
deleted file mode 100644
index a6c3ea8..0000000
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/client/IgfsClientFileIdsCallable.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * 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.processors.igfs.client;
-
-import org.apache.ignite.binary.BinaryObjectException;
-import org.apache.ignite.binary.BinaryRawReader;
-import org.apache.ignite.binary.BinaryRawWriter;
-import org.apache.ignite.igfs.IgfsPath;
-import org.apache.ignite.internal.processors.igfs.IgfsContext;
-import org.apache.ignite.internal.util.typedef.internal.S;
-import org.apache.ignite.lang.IgniteUuid;
-import org.jetbrains.annotations.Nullable;
-
-import java.util.List;
-
-/**
- * IGFS client file IDs callable.
- */
-public class IgfsClientFileIdsCallable extends IgfsClientAbstractCallable<List<IgniteUuid>> {
- /** */
- private static final long serialVersionUID = 0L;
-
- /** Path. */
- private IgfsPath path;
-
- /**
- * Default constructor.
- */
- public IgfsClientFileIdsCallable() {
- // NO-op.
- }
-
- /**
- * Constructor.
- *
- * @param igfsName IGFS name.
- * @param path Path.
- */
- public IgfsClientFileIdsCallable(@Nullable String igfsName, IgfsPath path) {
- super(igfsName);
-
- this.path = path;
- }
-
- /** {@inheritDoc} */
- @Override protected List<IgniteUuid> call0(IgfsContext ctx) throws Exception {
- return ctx.meta().fileIds(path);
- }
-
- /** {@inheritDoc} */
- @Override public void writeBinary0(BinaryRawWriter writer) throws BinaryObjectException {
- writer.writeObject(path);
- }
-
- /** {@inheritDoc} */
- @Override public void readBinary0(BinaryRawReader reader) throws BinaryObjectException {
- path = reader.readObject();
- }
-
- /** {@inheritDoc} */
- @Override public String toString() {
- return S.toString(IgfsClientFileIdsCallable.class, this);
- }
-}
http://git-wip-us.apache.org/repos/asf/ignite/blob/a2086bfc/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/client/IgfsClientMkdirsCallable.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/client/IgfsClientMkdirsCallable.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/client/IgfsClientMkdirsCallable.java
deleted file mode 100644
index f799026..0000000
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/client/IgfsClientMkdirsCallable.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * 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.processors.igfs.client;
-
-import org.apache.ignite.binary.BinaryObjectException;
-import org.apache.ignite.binary.BinaryRawReader;
-import org.apache.ignite.binary.BinaryRawWriter;
-import org.apache.ignite.igfs.IgfsPath;
-import org.apache.ignite.internal.processors.igfs.IgfsContext;
-import org.apache.ignite.internal.util.typedef.internal.S;
-import org.jetbrains.annotations.Nullable;
-
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * IGFS client mkdirs callable.
- */
-public class IgfsClientMkdirsCallable extends IgfsClientAbstractCallable<Void> {
- /** */
- private static final long serialVersionUID = 0L;
-
- /** Path. */
- private IgfsPath path;
-
- /** Properties. */
- private Map<String, String> props;
-
- /**
- * Default constructor.
- */
- public IgfsClientMkdirsCallable() {
- // NO-op.
- }
-
- /**
- * Constructor.
- *
- * @param igfsName IGFS name.
- * @param path Path.
- * @param props Properties.
- */
- public IgfsClientMkdirsCallable(@Nullable String igfsName, IgfsPath path, @Nullable Map<String, String> props) {
- super(igfsName);
-
- this.path = path;
- this.props = props;
- }
-
- /** {@inheritDoc} */
- @Override protected Void call0(IgfsContext ctx) throws Exception {
- ctx.igfs().mkdirs(path, props);
-
- return null;
- }
-
- /** {@inheritDoc} */
- @Override public void writeBinary0(BinaryRawWriter writer) throws BinaryObjectException {
- writer.writeObject(path);
-
- if (props != null) {
- writer.writeInt(props.size());
-
- for (Map.Entry<String, String> prop : props.entrySet()) {
- writer.writeString(prop.getKey());
- writer.writeString(prop.getValue());
- }
- }
- else
- writer.writeInt(0);
- }
-
- /** {@inheritDoc} */
- @Override public void readBinary0(BinaryRawReader reader) throws BinaryObjectException {
- path = reader.readObject();
-
- int propsSize = reader.readInt();
-
- if (propsSize > 0) {
- props = new HashMap<>(propsSize, 1.0f);
-
- for (int i = 0; i < propsSize; i++)
- props.put(reader.readString(), reader.readString());
- }
- }
-
- /** {@inheritDoc} */
- @Override public String toString() {
- return S.toString(IgfsClientMkdirsCallable.class, this);
- }
-}