Examples of PhysicalPartition


Examples of com.linkedin.databus.core.data_model.PhysicalPartition

    String fileStr = request.getRequiredStringParam(FILE_PATH_PARAM);
    String startWinStr = request.getParams().getProperty(START_WINDOW_PARAM, "false");
    String physicalParitionParameter = request.getParams().getProperty(PHYSICAL_PARTITION_ID_PARAM);

    LOG.info(PHYSICAL_PARTITION_ID_PARAM + "=" + physicalParitionParameter);
    PhysicalPartition pPartition = PhysicalSourceStaticConfig.getDefaultPhysicalPartition();
    if(physicalParitionParameter != null) {
      // physical partition parameter format is PPName_PPId
      pPartition = PhysicalPartition.parsePhysicalPartitionString(physicalParitionParameter, "_");
    }

    boolean startWin = Boolean.valueOf(startWinStr);

    BufferedReader in = new BufferedReader(new FileReader(fileStr));

    try
    {
      //PhysicalPartition pPartition = new PhysicalPartition(physicalPartitionId);
      // TODO this should actually use DbusEventBufferAppendable (DDSDBUS-78)
      DbusEventBuffer buf = (DbusEventBuffer)_eventBuffer.getDbusEventBufferAppendable(pPartition);
      if(buf == null)
        throw new RequestProcessingException("cannot find buffer for ph. partion " + pPartition);

      if ((buf.getMinScn() < 0) && (buf.getPrevScn() < 0)) buf.start(0);

      try
      {
        DbusEventsStatisticsCollector statsCollector = _relay.getInBoundStatsCollectors().getStatsCollector(pPartition.toSimpleString());

        int eventsAppended = 0;
        if (!((eventsAppended = DbusEventSerializable.appendToEventBuffer(in, buf, statsCollector, startWin))>0))
        {
          throw new RequestProcessingException("event loading failed");
View Full Code Here

Examples of com.linkedin.databus.core.data_model.PhysicalPartition

          if (debugEnabled) {
            LOG.debug("Ignoring checkpoint mult key" + m.getKey());
          }
          continue;
        }
        PhysicalPartition pPart = PhysicalPartition.createFromJsonString(m.getKey());
        String cpString = m.getValue();//serialized checkpoint
        Checkpoint cp = new Checkpoint(cpString);
        if(debugEnabled)
          LOG.debug("CPMULT constructor: pPart="+pPart + ";cp="+cp);
        _pPart2Checkpoint.put(pPart, cp);
        if (cp.isPartialWindow()) {
          if (_partialWindowPartition != null) {
            throw new InvalidParameterSpecException("Multiple partitions with partial window:" +
                  _partialWindowPartition.toSimpleString() + " and " + pPart.toSimpleString());
          }
          _partialWindowPartition = pPart;
        }
      }
    }
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.