Skip to content

Commit

Permalink
# IGNITE-226: WIP.
Browse files Browse the repository at this point in the history
  • Loading branch information
vozerov-gridgain committed Feb 13, 2015
1 parent 141f828 commit 5dad54e
Show file tree
Hide file tree
Showing 85 changed files with 336 additions and 336 deletions.
2 changes: 1 addition & 1 deletion modules/core/src/main/java/org/apache/ignite/IgniteFs.java
Expand Up @@ -58,7 +58,7 @@
*/ */
public interface IgniteFs extends Igfs, IgniteAsyncSupport { public interface IgniteFs extends Igfs, IgniteAsyncSupport {
/** GGFS scheme name. */ /** GGFS scheme name. */
public static final String GGFS_SCHEME = "ggfs"; public static final String IGFS_SCHEME = "igfs";


/** File property: prefer writes to local node. */ /** File property: prefer writes to local node. */
public static final String PROP_PREFER_LOCAL_WRITES = "locWrite"; public static final String PROP_PREFER_LOCAL_WRITES = "locWrite";
Expand Down
Expand Up @@ -58,7 +58,7 @@ public class IgfsConfiguration {
public static final int DFLT_GGFS_LOG_BATCH_SIZE = 100; public static final int DFLT_GGFS_LOG_BATCH_SIZE = 100;


/** Default {@code GGFS} log directory. */ /** Default {@code GGFS} log directory. */
public static final String DFLT_GGFS_LOG_DIR = "work/ggfs/log"; public static final String DFLT_GGFS_LOG_DIR = "work/igfs/log";


/** Default per node buffer size. */ /** Default per node buffer size. */
public static final int DFLT_PER_NODE_BATCH_SIZE = 100; public static final int DFLT_PER_NODE_BATCH_SIZE = 100;
Expand Down
Expand Up @@ -28,7 +28,7 @@
* GridGgfsPath filePath = new GridGgfsPath("my/working/dir", "file.txt"); * GridGgfsPath filePath = new GridGgfsPath("my/working/dir", "file.txt");
* *
* // Get metadata about file. * // Get metadata about file.
* GridGgfsFile file = ggfs.info(filePath); * GridGgfsFile file = igfs.info(filePath);
* </pre> * </pre>
*/ */
public interface IgfsFile { public interface IgfsFile {
Expand Down
Expand Up @@ -34,7 +34,7 @@
* GridGgfsPath filePath = new GridGgfsPath(dirPath, "file.txt"); * GridGgfsPath filePath = new GridGgfsPath(dirPath, "file.txt");
* *
* // Get metadata about file. * // Get metadata about file.
* GridGgfsFile file = ggfs.info(filePath); * GridGgfsFile file = igfs.info(filePath);
* </pre> * </pre>
*/ */
public final class IgfsPath implements Comparable<IgfsPath>, Externalizable { public final class IgfsPath implements Comparable<IgfsPath>, Externalizable {
Expand Down
Expand Up @@ -64,7 +64,7 @@ public final class IgniteNodeAttributes {
public static final String ATTR_TX_CONFIG = ATTR_PREFIX + ".tx"; public static final String ATTR_TX_CONFIG = ATTR_PREFIX + ".tx";


/** Internal attribute name constant. */ /** Internal attribute name constant. */
public static final String ATTR_GGFS = ATTR_PREFIX + ".ggfs"; public static final String ATTR_GGFS = ATTR_PREFIX + ".igfs";


/** Internal attribute name constant. */ /** Internal attribute name constant. */
public static final String ATTR_MONGO = ATTR_PREFIX + ".mongo"; public static final String ATTR_MONGO = ATTR_PREFIX + ".mongo";
Expand Down
Expand Up @@ -1501,9 +1501,9 @@ private void start0(GridStartContext startCtx) throws IgniteCheckedException {
0, 0,
new LinkedBlockingQueue<Runnable>()); new LinkedBlockingQueue<Runnable>());


// Note that we do not pre-start threads here as ggfs pool may not be needed. // Note that we do not pre-start threads here as igfs pool may not be needed.
ggfsExecSvc = new IgniteThreadPoolExecutor( ggfsExecSvc = new IgniteThreadPoolExecutor(
"ggfs-" + cfg.getGridName(), "igfs-" + cfg.getGridName(),
cfg.getGgfsThreadPoolSize(), cfg.getGgfsThreadPoolSize(),
cfg.getGgfsThreadPoolSize(), cfg.getGgfsThreadPoolSize(),
0, 0,
Expand Down
Expand Up @@ -220,7 +220,7 @@ private IgfsLogger(String endpoint, String ggfsName, String dir, int batchSize)
A.ensure(dirFile.isDirectory(), "dir must point to a directory"); A.ensure(dirFile.isDirectory(), "dir must point to a directory");
A.ensure(dirFile.exists(), "dir must exist"); A.ensure(dirFile.exists(), "dir must exist");


file = new File(dirFile, "ggfs-log-" + ggfsName + "-" + pid + ".csv"); file = new File(dirFile, "igfs-log-" + ggfsName + "-" + pid + ".csv");


entries = new ConcurrentLinkedDeque8<>(); entries = new ConcurrentLinkedDeque8<>();


Expand Down
Expand Up @@ -4750,7 +4750,7 @@ protected Object readResolve() throws ObjectStreamException {
} }


/** {@inheritDoc} */ /** {@inheritDoc} */
@Override public long ggfsDataSpaceUsed() { @Override public long igfsDataSpaceUsed() {
assert ggfsDataCache; assert ggfsDataCache;


return ggfsDataCacheSize.longValue(); return ggfsDataCacheSize.longValue();
Expand Down
Expand Up @@ -195,7 +195,7 @@ protected void value(@Nullable V val, @Nullable byte[] valBytes) {
assert Thread.holdsLock(this); assert Thread.holdsLock(this);


// In case we deal with GGFS cache, count updated data // In case we deal with GGFS cache, count updated data
if (cctx.cache().isGgfsDataCache() && cctx.kernalContext().ggfsHelper().isGgfsBlockKey(key())) { if (cctx.cache().isGgfsDataCache() && cctx.kernalContext().ggfsHelper().isIgfsBlockKey(key())) {
int newSize = valueLength((byte[])val, valBytes != null ? GridCacheValueBytes.marshaled(valBytes) : int newSize = valueLength((byte[])val, valBytes != null ? GridCacheValueBytes.marshaled(valBytes) :
GridCacheValueBytes.nil()); GridCacheValueBytes.nil());
int oldSize = valueLength((byte[])this.val, this.val == null ? valueBytesUnlocked() : int oldSize = valueLength((byte[])this.val, this.val == null ? valueBytesUnlocked() :
Expand Down
Expand Up @@ -344,7 +344,7 @@ public IgniteInternalFuture<Boolean> removexAsync(K key, @Nullable GridCacheEntr
* *
* @return Amount of used GGFS space in bytes. * @return Amount of used GGFS space in bytes.
*/ */
public long ggfsDataSpaceUsed(); public long igfsDataSpaceUsed();


/** /**
* Get maximum space available for GGFS. * Get maximum space available for GGFS.
Expand Down
Expand Up @@ -713,8 +713,8 @@ private IgnitePredicate<Cache.Entry<K, V>> visitor(final IgnitePredicate<Cache.E
} }


/** {@inheritDoc} */ /** {@inheritDoc} */
@Override public long ggfsDataSpaceUsed() { @Override public long igfsDataSpaceUsed() {
return cache.ggfsDataSpaceUsed(); return cache.igfsDataSpaceUsed();
} }


/** {@inheritDoc} */ /** {@inheritDoc} */
Expand Down
Expand Up @@ -565,11 +565,11 @@ public GridCacheProjectionImpl<K, V> gateProjection() {
} }


/** {@inheritDoc} */ /** {@inheritDoc} */
@Override public long ggfsDataSpaceUsed() { @Override public long igfsDataSpaceUsed() {
GridCacheProjectionImpl<K, V> prev = gate.enter(prj); GridCacheProjectionImpl<K, V> prev = gate.enter(prj);


try { try {
return delegate.ggfsDataSpaceUsed(); return delegate.igfsDataSpaceUsed();
} }
finally { finally {
gate.leave(prev); gate.leave(prev);
Expand Down
Expand Up @@ -493,7 +493,7 @@ private boolean preloadEntry(ClusterNode pick, int p, GridCacheEntryInfo<K, V> e
log.debug("Preloading key [key=" + entry.key() + ", part=" + p + ", node=" + pick.id() + ']'); log.debug("Preloading key [key=" + entry.key() + ", part=" + p + ", node=" + pick.id() + ']');


if (cctx.dht().isGgfsDataCache() && if (cctx.dht().isGgfsDataCache() &&
cctx.dht().ggfsDataSpaceUsed() > cctx.dht().ggfsDataSpaceMax()) { cctx.dht().igfsDataSpaceUsed() > cctx.dht().ggfsDataSpaceMax()) {
LT.error(log, null, "Failed to preload GGFS data cache (GGFS space size exceeded maximum " + LT.error(log, null, "Failed to preload GGFS data cache (GGFS space size exceeded maximum " +
"value, will ignore preload entries): " + name()); "value, will ignore preload entries): " + name());


Expand Down
Expand Up @@ -633,8 +633,8 @@ public boolean clearLocally0(K key, @Nullable IgnitePredicate<Cache.Entry<K, V>>
} }


/** {@inheritDoc} */ /** {@inheritDoc} */
@Override public long ggfsDataSpaceUsed() { @Override public long igfsDataSpaceUsed() {
return dht().ggfsDataSpaceUsed(); return dht().igfsDataSpaceUsed();
} }


/** {@inheritDoc} */ /** {@inheritDoc} */
Expand Down
Expand Up @@ -712,7 +712,7 @@ private String poolName(GridClosurePolicy plc) {
return "system"; return "system";


case GGFS_POOL: case GGFS_POOL:
return "ggfs"; return "igfs";


default: default:
throw new IllegalArgumentException("Invalid closure execution policy: " + plc); throw new IllegalArgumentException("Invalid closure execution policy: " + plc);
Expand Down

0 comments on commit 5dad54e

Please sign in to comment.