Examples of ReplicationException


Examples of org.apache.hadoop.hbase.replication.ReplicationException

   * @throws KeeperException
   */
  public void appendPeerTableCFs(String id, Map<TableName, ? extends Collection<String>> tableCfs)
      throws ReplicationException {
    if (tableCfs == null) {
      throw new ReplicationException("tableCfs is null");
    }
    Map<TableName, List<String>> preTableCfs = parseTableCFsFromConfig(getPeerTableCFs(id));
    if (preTableCfs == null) {
      setPeerTableCFs(id, tableCfs);
      return;
View Full Code Here

Examples of org.apache.hadoop.hbase.replication.ReplicationException

   * @throws ReplicationException
   */
  public void removePeerTableCFs(String id, Map<TableName, ? extends Collection<String>> tableCfs)
      throws ReplicationException {
    if (tableCfs == null) {
      throw new ReplicationException("tableCfs is null");
    }

    Map<TableName, List<String>> preTableCfs = parseTableCFsFromConfig(getPeerTableCFs(id));
    if (preTableCfs == null) {
      throw new ReplicationException("Table-Cfs for peer" + id + " is null");
    }
    for (Map.Entry<TableName, ? extends Collection<String>> entry: tableCfs.entrySet()) {
      TableName table = entry.getKey();
      Collection<String> removeCfs = entry.getValue();
      if (preTableCfs.containsKey(table)) {
        List<String> cfs = preTableCfs.get(table);
        if (cfs == null && removeCfs == null) {
          preTableCfs.remove(table);
        } else if (cfs != null && removeCfs != null) {
          Set<String> cfSet = new HashSet<String>(cfs);
          cfSet.removeAll(removeCfs);
          if (cfSet.isEmpty()) {
            preTableCfs.remove(table);
          } else {
            preTableCfs.put(table, Lists.newArrayList(cfSet));
          }
        } else if (cfs == null && removeCfs != null) {
          throw new ReplicationException("Cannot remove cf of table: " + table
              + " which doesn't specify cfs from table-cfs config in peer: " + id);
        } else if (cfs != null && removeCfs == null) {
          throw new ReplicationException("Cannot remove table: " + table
              + " which has specified cfs from table-cfs config in peer: " + id);
        }
      } else {
        throw new ReplicationException("No table: " + table + " in table-cfs config of peer: " + id);
      }
    }
    setPeerTableCFs(id, preTableCfs);
  }
View Full Code Here

Examples of org.apache.hadoop.hbase.replication.ReplicationException

   * @throws KeeperException
   */
  public void appendPeerTableCFs(String id, Map<TableName, ? extends Collection<String>> tableCfs)
      throws ReplicationException {
    if (tableCfs == null) {
      throw new ReplicationException("tableCfs is null");
    }
    Map<TableName, List<String>> preTableCfs = parseTableCFsFromConfig(getPeerTableCFs(id));
    if (preTableCfs == null) {
      setPeerTableCFs(id, tableCfs);
      return;
View Full Code Here

Examples of org.apache.hadoop.hbase.replication.ReplicationException

   * @throws ReplicationException
   */
  public void removePeerTableCFs(String id, Map<TableName, ? extends Collection<String>> tableCfs)
      throws ReplicationException {
    if (tableCfs == null) {
      throw new ReplicationException("tableCfs is null");
    }

    Map<TableName, List<String>> preTableCfs = parseTableCFsFromConfig(getPeerTableCFs(id));
    if (preTableCfs == null) {
      throw new ReplicationException("Table-Cfs for peer" + id + " is null");
    }
    for (Map.Entry<TableName, ? extends Collection<String>> entry: tableCfs.entrySet()) {
      TableName table = entry.getKey();
      Collection<String> removeCfs = entry.getValue();
      if (preTableCfs.containsKey(table)) {
        List<String> cfs = preTableCfs.get(table);
        if (cfs == null && removeCfs == null) {
          preTableCfs.remove(table);
        } else if (cfs != null && removeCfs != null) {
          Set<String> cfSet = new HashSet<String>(cfs);
          cfSet.removeAll(removeCfs);
          if (cfSet.isEmpty()) {
            preTableCfs.remove(table);
          } else {
            preTableCfs.put(table, Lists.newArrayList(cfSet));
          }
        } else if (cfs == null && removeCfs != null) {
          throw new ReplicationException("Cannot remove cf of table: " + table
              + " which doesn't specify cfs from table-cfs config in peer: " + id);
        } else if (cfs != null && removeCfs == null) {
          throw new ReplicationException("Cannot remove table: " + table
              + " which has specified cfs from table-cfs config in peer: " + id);
        }
      } else {
        throw new ReplicationException("No table: " + table + " in table-cfs config of peer: " + id);
      }
    }
    setPeerTableCFs(id, preTableCfs);
  }
View Full Code Here

Examples of org.exoplatform.services.jcr.ext.replication.ReplicationException

            dispatcher.setMembershipListener(this);
         }
      }
      catch (ChannelException e)
      {
         throw new ReplicationException("Can't create JGroups channel", e);
      }

      LOG.info("Channel name : " + channelName);

      try
      {
         channel.connect(channelName);
         this.state = CONNECTED;
      }
      catch (ChannelException e)
      {
         throw new ReplicationException("Can't connect to JGroups channel", e);
      }
      finally
      {
         latch.countDown();
      }
View Full Code Here

Examples of org.exoplatform.services.jcr.ext.replication.ReplicationException

               saveChangesLog(dataManager, normalizeChangesLog, cLogTime);
         }
      }
      catch (Throwable t)
      {
         throw new ReplicationException("Save error. Log time " + cLogTime.getTime(), t);
      }
   }
View Full Code Here

Examples of org.exoplatform.services.jcr.ext.replication.ReplicationException

               saveChangesLog(dataManager, normalizeChangesLog, cLogTime);
         }
      }
      catch (Throwable t)
      {
         throw new ReplicationException("Save error. Log time " + cLogTime.getTime(), t);
      }
   }
View Full Code Here

Examples of org.exoplatform.services.jcr.ext.replication.ReplicationException

            dispatcher.setMembershipListener(this);
         }
      }
      catch (ChannelException e)
      {
         throw new ReplicationException("Can't create JGroups channel", e);
      }

      LOG.info("Channel name : " + channelName);

      try
      {
         channel.connect(channelName);
         this.state = CONNECTED;
      }
      catch (ChannelException e)
      {
         throw new ReplicationException("Can't connect to JGroups channel", e);
      }
      finally
      {
         latch.countDown();
      }
View Full Code Here

Examples of org.exoplatform.services.jcr.ext.replication.ReplicationException

            dispatcher.setMembershipListener(this);
         }
      }
      catch (ChannelException e)
      {
         throw new ReplicationException("Can't create JGroups channel", e);
      }

      LOG.info("Channel name : " + channelName);

      try
      {
         channel.connect(channelName);
         this.state = CONNECTED;
      }
      catch (ChannelException e)
      {
         throw new ReplicationException("Can't connect to JGroups channel", e);
      }
      finally
      {
         latch.countDown();
      }
View Full Code Here

Examples of org.exoplatform.services.jcr.ext.replication.ReplicationException

               saveChangesLog(dataManager, normalizeChangesLog, cLogTime);
         }
      }
      catch (Throwable t)
      {
         throw new ReplicationException("Save error. Log time " + cLogTime.getTime(), t);
      }
   }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.