You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by kl...@apache.org on 2016/05/20 17:10:40 UTC

[15/50] [abbrv] incubator-geode git commit: GEODE-1222: remove InsufficientDiskSpaceException

GEODE-1222: remove InsufficientDiskSpaceException


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

Branch: refs/heads/feature/GEODE-835
Commit: e1cbc9b25da6353b62e7d59c67babc470e81eb1f
Parents: b6de5a3
Author: Darrel Schneider <ds...@pivotal.io>
Authored: Wed May 11 16:05:48 2016 -0700
Committer: Darrel Schneider <ds...@pivotal.io>
Committed: Mon May 16 11:29:06 2016 -0700

----------------------------------------------------------------------
 .../InsufficientDiskSpaceException.java         | 53 --------------------
 .../gemstone/gemfire/internal/cache/Oplog.java  |  7 ++-
 .../codeAnalysis/sanctionedSerializables.txt    |  1 -
 3 files changed, 3 insertions(+), 58 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e1cbc9b2/geode-core/src/main/java/com/gemstone/gemfire/internal/InsufficientDiskSpaceException.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/InsufficientDiskSpaceException.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/InsufficientDiskSpaceException.java
deleted file mode 100644
index be87c8b..0000000
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/InsufficientDiskSpaceException.java
+++ /dev/null
@@ -1,53 +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 com.gemstone.gemfire.internal;
-
-import java.io.DataOutput;
-import java.io.IOException;
-
-import com.gemstone.gemfire.cache.DiskAccessException;
-import com.gemstone.gemfire.cache.DiskStore;
-import com.gemstone.gemfire.internal.Sendable;
-
-/**
- * @since gfxd 1.0.1
- */
-public class InsufficientDiskSpaceException extends DiskAccessException implements Sendable {
-  private static final long serialVersionUID = -6167707908956900841L;
-
-  public InsufficientDiskSpaceException(String msg, Throwable cause, DiskStore ds) {
-    super(msg, cause, ds);
-  }
-
-  /**
-   * {@inheritDoc}
-   */
-  @Override
-  public void sendTo(DataOutput out) throws IOException {
-    // send base DiskAccessException to older versions
-    Version peerVersion = InternalDataSerializer.getVersionForDataStream(out);
-    if (Version.GFE_80.compareTo(peerVersion) > 0) {
-      DiskAccessException dae = new DiskAccessException(getMessage(),
-          getCause());
-      InternalDataSerializer.writeSerializableObject(dae, out);
-    }
-    else {
-      InternalDataSerializer.writeSerializableObject(this, out);
-    }
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e1cbc9b2/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/Oplog.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/Oplog.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/Oplog.java
index 4728594..96f616b 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/Oplog.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/Oplog.java
@@ -77,7 +77,6 @@ import com.gemstone.gemfire.internal.Assert;
 import com.gemstone.gemfire.internal.ByteArrayDataInput;
 import com.gemstone.gemfire.internal.FileUtil;
 import com.gemstone.gemfire.internal.HeapDataOutputStream;
-import com.gemstone.gemfire.internal.InsufficientDiskSpaceException;
 import com.gemstone.gemfire.internal.InternalDataSerializer;
 import com.gemstone.gemfire.internal.InternalStatisticsDisabledException;
 import com.gemstone.gemfire.internal.Sendable;
@@ -603,7 +602,7 @@ public final class Oplog implements CompactableOplog, Flushable {
     long availableSpace = this.dirHolder.getAvailableSpace();
     if (availableSpace < maxOplogSizeParam) {
       if (DiskStoreImpl.PREALLOCATE_OPLOGS && !DiskStoreImpl.SET_IGNORE_PREALLOCATE) {
-        throw new InsufficientDiskSpaceException(LocalizedStrings.Oplog_PreAllocate_Failure_Init.toLocalizedString(this.dirHolder,
+        throw new DiskAccessException(LocalizedStrings.Oplog_PreAllocate_Failure_Init.toLocalizedString(this.dirHolder,
             maxOplogSizeParam), new IOException("not enough space left to create and pre grow oplog files, available="
             + availableSpace + ", required=" + maxOplogSizeParam), getParent());
       }
@@ -1070,13 +1069,13 @@ public final class Oplog implements CompactableOplog, Flushable {
          * false; } } }
          */
         closeAndDeleteAfterEx(ioe, olf);
-        throw new InsufficientDiskSpaceException(LocalizedStrings.Oplog_PreAllocate_Failure.toLocalizedString(olf.f
+        throw new DiskAccessException(LocalizedStrings.Oplog_PreAllocate_Failure.toLocalizedString(olf.f
             .getAbsolutePath(), maxSize), ioe, getParent());
       }
     }
     // TODO: Perhaps the test flag is not requierd here. Will re-visit.
     else if (DiskStoreImpl.PREALLOCATE_OPLOGS && !DiskStoreImpl.SET_IGNORE_PREALLOCATE) {
-      throw new InsufficientDiskSpaceException(LocalizedStrings.Oplog_PreAllocate_Failure.toLocalizedString(
+      throw new DiskAccessException(LocalizedStrings.Oplog_PreAllocate_Failure.toLocalizedString(
           olf.f.getAbsolutePath(), maxSize), new IOException("not enough space left to pre-blow, available=" + availableSpace
           + ", required=" + maxSize), getParent());
     }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e1cbc9b2/geode-core/src/test/resources/com/gemstone/gemfire/codeAnalysis/sanctionedSerializables.txt
----------------------------------------------------------------------
diff --git a/geode-core/src/test/resources/com/gemstone/gemfire/codeAnalysis/sanctionedSerializables.txt b/geode-core/src/test/resources/com/gemstone/gemfire/codeAnalysis/sanctionedSerializables.txt
index fa02ca3..1ee16d5 100755
--- a/geode-core/src/test/resources/com/gemstone/gemfire/codeAnalysis/sanctionedSerializables.txt
+++ b/geode-core/src/test/resources/com/gemstone/gemfire/codeAnalysis/sanctionedSerializables.txt
@@ -246,7 +246,6 @@ com/gemstone/gemfire/internal/ConfigSource$Type,false
 com/gemstone/gemfire/internal/CopyOnWriteHashSet,true,8591978652141659932
 com/gemstone/gemfire/internal/DSFIDFactory$SqlfSerializationException,true,5076687296705595933
 com/gemstone/gemfire/internal/DSFIDNotFoundException,true,130596009484324655,dsfid:int,versionOrdinal:short
-com/gemstone/gemfire/internal/InsufficientDiskSpaceException,true,-6167707908956900841
 com/gemstone/gemfire/internal/InternalDataSerializer$SERIALIZATION_VERSION,false
 com/gemstone/gemfire/internal/InternalStatisticsDisabledException,true,4146181546364258311
 com/gemstone/gemfire/internal/LinuxProcFsStatistics$CPU,false