Examples of LocalEnvironment


Examples of com.google.appengine.tools.development.LocalEnvironment

  /**
   * Constructs the {@link com.google.apphosting.api.ApiProxy.Environment} that
   * will be installed. Subclass and override to provide your own implementation.
   */
  protected ApiProxy.Environment newEnvironment() {
    LocalEnvironment env = new LocalEnvironment(envAppId, envModuleId,
        envVersionId, envInstance, TestLocalServerEnvironment.TEST_PORT, null) {
      @Override
      public String getEmail() {
        return envEmail;
      }

      @Override
      public boolean isLoggedIn() {
        return envIsLoggedIn;
      }

      @Override
      public boolean isAdmin() {
        return envIsAdmin;
      }

      @Override
      public String getAuthDomain() {
        return envAuthDomain;
      }

      @Override
      public long getRemainingMillis() {
        return timer.getRemainingMillis();
      }
    };
    env.getAttributes().putAll(envAttributes);
    return env;
  }
View Full Code Here

Examples of com.google.appengine.tools.development.LocalEnvironment

  {
  }

  public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException
  {
    LocalEnvironment env = new LocalHttpRequestEnvironment(appEngineWebXml, (HttpServletRequest)servletRequest);
    ApiProxy.setEnvironmentForCurrentThread(env);
    try
    {
      filterChain.doFilter(servletRequest, servletResponse);
    }
View Full Code Here

Examples of com.odiago.flumebase.exec.local.LocalEnvironment

    getSymbolTable().addSymbol(stream);

    getConf().set(SelectStmt.CLIENT_SELECT_TARGET_KEY, "testSelect");

    // With all configuration complete, connect to the environment.
    LocalEnvironment env = getEnvironment();
    env.connect();

    // Run the query.
    QuerySubmitResponse response = env.submitQuery("SELECT fieldname FROM memstream",
        getQueryOpts());
    FlowId id = response.getFlowId();
    assertNotNull(id);
    joinFlow(id);
View Full Code Here

Examples of com.odiago.flumebase.exec.local.LocalEnvironment

    getSymbolTable().addSymbol(stream);

    getConf().set(SelectStmt.CLIENT_SELECT_TARGET_KEY, "testSelect");

    // With all configuration complete, connect to the environment.
    LocalEnvironment env = getEnvironment();
    env.connect();

    // Run the query.
    QuerySubmitResponse response = env.submitQuery("SELECT fieldname FROM memstream",
        getQueryOpts());
    FlowId id = response.getFlowId();
    assertNotNull(id);
    joinFlow(id);
View Full Code Here

Examples of com.odiago.flumebase.exec.local.LocalEnvironment

    getSymbolTable().addSymbol(stream);

    getConf().set(SelectStmt.CLIENT_SELECT_TARGET_KEY, "testSelect");

    // With all configuration complete, connect to the environment.
    LocalEnvironment env = getEnvironment();
    env.connect();

    // Run the query.
    QuerySubmitResponse response = env.submitQuery(query, getQueryOpts());
    FlowId id = response.getFlowId();
    assertNotNull(response.getMessage(), id);
    joinFlow(id);

    // Examine the response records.
View Full Code Here

Examples of com.odiago.flumebase.exec.local.LocalEnvironment

    getSymbolTable().addSymbol(stream);

    getConf().set(SelectStmt.CLIENT_SELECT_TARGET_KEY, "testSelect");

    // With all configuration complete, connect to the environment.
    LocalEnvironment env = getEnvironment();
    env.connect();

    // Run the query.
    QuerySubmitResponse response = env.submitQuery(query, getQueryOpts());
    FlowId id = response.getFlowId();
    assertNotNull(response.getMessage(), id);
    joinFlow(id);

    // Examine the response records.
View Full Code Here

Examples of com.odiago.flumebase.exec.local.LocalEnvironment

    getSymbolTable().addSymbol(stream);
    getConf().set(SelectStmt.CLIENT_SELECT_TARGET_KEY, "testSelect");

    // Connect to the environment and run it.
    LocalEnvironment env = getEnvironment();
    env.connect();

    // Run the query.
    QuerySubmitResponse response = env.submitQuery(query, getQueryOpts());
    FlowId id = response.getFlowId();
    assertNotNull(id);
    joinFlow(id);

    // Examine the response records.
View Full Code Here

Examples of com.odiago.flumebase.exec.local.LocalEnvironment

    getSymbolTable().addSymbol(stream);

    getConf().set(SelectStmt.CLIENT_SELECT_TARGET_KEY, "testSelect");

    // With all configuration complete, connect to the environment.
    LocalEnvironment env = getEnvironment();
    env.connect();

    // Run the query.
    QuerySubmitResponse response = env.submitQuery(query, getQueryOpts());
    FlowId id = response.getFlowId();
    assertNotNull(response.getMessage(), id);
    joinFlow(id);

    // Examine the response records.
View Full Code Here

Examples of com.odiago.flumebase.exec.local.LocalEnvironment

    streamBuilder.setSource("tail(\"" + sourceFilename + "\")");
    StreamSymbol inputStream = streamBuilder.build();

    getSymbolTable().addSymbol(inputStream);

    LocalEnvironment env = getEnvironment();
    env.connect();

    // Create another stream that selects 2 * any value we put into 'inputstream'.
    QuerySubmitResponse createResponse = env.submitQuery(
        "CREATE STREAM doubled AS SELECT 2 * a as b FROM inputstream",
        getQueryOpts());
    LOG.info("Create response message: " + createResponse.getMessage());
    FlowId createId = createResponse.getFlowId();
    assertNotNull(createId);

    // Select 3 * any value in doubled.

    getConf().set(SelectStmt.CLIENT_SELECT_TARGET_KEY, "test6x");
    QuerySubmitResponse queryResponse = env.submitQuery(
        "SELECT 3 * b as c FROM doubled", getQueryOpts());
    LOG.info("Query response message: " + queryResponse.getMessage());
    FlowId queryId = queryResponse.getFlowId();
    assertNotNull(queryId);

View Full Code Here

Examples of com.odiago.flumebase.exec.local.LocalEnvironment

    streamBuilder.setSourceType(StreamSourceType.Node);
    streamBuilder.setLocal(false);
    streamBuilder.addField("x", Type.getPrimitive(Type.TypeName.STRING));

    getSymbolTable().addSymbol(streamBuilder.build());
    LocalEnvironment env = getEnvironment();
    env.connect();

    getConf().set(SelectStmt.CLIENT_SELECT_TARGET_KEY, "select-out");

    QuerySubmitResponse selectResponse = env.submitQuery(
        "SELECT * FROM inputstream",
        getQueryOpts());
    assertNotNull(selectResponse);
    FlowId queryId = selectResponse.getFlowId();
    assertNotNull(queryId);
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.