Package co.cask.cdap.api.data.stream

Examples of co.cask.cdap.api.data.stream.StreamSpecification


  }

  @Override
  public void addStream(Stream stream) {
    Preconditions.checkArgument(stream != null, "Stream cannot be null.");
    StreamSpecification spec = stream.configure();
    streams.put(spec.getName(), spec);
  }
View Full Code Here


        responder.sendString(HttpResponseStatus.BAD_REQUEST, "oldStreamId param is required");
        return;
      }

      String accountId = getAuthenticatedAccountId(request);
      StreamSpecification stream = store.getStream(Id.Account.from(accountId), streamId);
      if (stream == null) {
        responder.sendString(HttpResponseStatus.BAD_REQUEST, "Stream specified with streamId param does not exist");
        return;
      }
View Full Code Here

        if (dsSpec != null) {
          typeName = dsSpec.getType();
        }
        return GSON.toJson(makeDataSetRecord(name, typeName));
      } else if (type == Data.STREAM) {
        StreamSpecification spec = store.getStream(account, name);
        return spec == null ? "" : GSON.toJson(makeStreamRecord(spec.getName(), spec));
      }
      return "";
    } catch (OperationException e) {
      LOG.warn(e.getMessage(), e);
      throw new Exception("Could not retrieve data specs for " + programId.toString() + ", reason: " + e.getMessage());
View Full Code Here

TOP

Related Classes of co.cask.cdap.api.data.stream.StreamSpecification

Copyright © 2018 www.massapicom. 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.