Examples of Macro


Examples of org.apache.hadoop.chukwa.database.Macro

    for(int i=0;i<timeWindow.length;i++) {
      try {
        DatabaseWriter db = new DatabaseWriter(cluster);
        for(String table : tables) {
          String query = "select * from ["+table+"];";
          Macro mp = new Macro(current,query);
          query = mp.toString();
          ResultSet rs = db.query(query);
          rs.last();
          int count = rs.getRow();
          assertTrue("Table should exist and return empty result.", count==0);
        }
View Full Code Here

Examples of org.apache.hadoop.chukwa.database.Macro

    }

  public void verifyTable(String table) {
    ChukwaConfiguration cc = new ChukwaConfiguration();
    String query = "select * from ["+table+"];";
    Macro mp = new Macro(dbSetup.current,query);
    query = mp.toString();
    try {
      DatabaseWriter db = new DatabaseWriter(dbSetup.cluster);
      ResultSet rs = db.query(query);
      while(rs.next()) {
        int i = 1;
View Full Code Here

Examples of org.apache.maven.doxia.macro.Macro

    @Override
    public void executeMacro( String macroId, MacroRequest request, Sink sink )
    throws MacroExecutionException, MacroNotFoundException
    {
        Macro m = macroProvider.resolveMacro(macroId);
        if(m == null) {
            m = new DefaultMacro(macroId);
        }
        m.execute( sink, request );
    }
View Full Code Here

Examples of org.apache.maven.doxia.macro.Macro

    /** {@inheritDoc} */
    public Macro getMacro( String id )
        throws MacroNotFoundException
    {
        Macro macro = macros.get( id );

        if ( macro == null )
        {
            throw new MacroNotFoundException( "Cannot find macro with id = " + id );
        }
View Full Code Here

Examples of org.apache.maven.doxia.macro.Macro

    // Made public right now because of the structure of the APT parser and
    // all its inner classes.
    public void executeMacro( String macroId, MacroRequest request, Sink sink )
        throws MacroExecutionException, MacroNotFoundException
    {
        Macro macro = getMacroManager().getMacro( macroId );

        macro.enableLogging( getLog() );

        macro.execute( sink, request );
    }
View Full Code Here

Examples of org.apache.maven.doxia.macro.Macro

    {
        MacroManager mm = (MacroManager) lookup( MacroManager.ROLE );

        assertNotNull( mm );

        Macro macro = mm.getMacro( "snippet" );
        assertNotNull( macro );

        try
        {
            macro = mm.getMacro( "weirdId" );
View Full Code Here

Examples of org.apache.maven.doxia.macro.Macro

    // Made public right now because of the structure of the APT parser and
    // all its inner classes.
    public void executeMacro( String macroId, MacroRequest request, Sink sink )
        throws MacroExecutionException, MacroNotFoundException
    {
        Macro macro = getMacroManager().getMacro( macroId );

        macro.enableLogging( getLog() );

        macro.execute( sink, request );
    }
View Full Code Here

Examples of org.apache.slide.macro.Macro

        if (callerUri.equals(objectUri)) {
            return;
        }
   
        SlideToken slideToken = new SlideTokenImpl(new CredentialsToken(caller));
        Macro macro = nat.getMacroHelper();
   
        try {
            nat.begin();
   
            boolean recursive = true;
            boolean overwrite = false;
            MacroParameters parameters = new MacroParameters(recursive,overwrite);
   
            macro.delete(slideToken,objectUri,parameters);
   
            nat.commit();
        }
        catch (Exception e) {
            try {
View Full Code Here

Examples of org.apache.slide.macro.Macro

        if (callerUri.equals(objectUri)) {
            return;
        }
   
        SlideToken slideToken = new SlideTokenImpl(new CredentialsToken(caller));
        Macro macro = nat.getMacroHelper();
   
        try {
            nat.begin();
   
            boolean recursive = true;
            boolean overwrite = false;
            MacroParameters parameters = new MacroParameters(recursive,overwrite);
   
            macro.delete(slideToken,objectUri,parameters);
   
            nat.commit();
        }
        catch (Exception e) {
            try {
View Full Code Here

Examples of org.apache.slide.macro.Macro

                                Principal principal)
                                  throws ProcessingException {

        if (principal.getName().length()>0) {
            // get the helpers
            Macro macro = nat.getMacroHelper();

            SlideToken slidetoken = new SlideTokenImpl(new CredentialsToken(caller));

            // get the path of the current authenticated user
            String selfUri = config.getUsersPath()+"/"+caller.getName();

            String strUri = config.getUsersPath()+"/"+principal.getName();

            // do the actual transaction
            try {
                try {
                    nat.begin();

                    // the user may not delete herself
                    if ( !selfUri.equals(strUri)) {
                        macro.delete(slidetoken, strUri,
                                     new MacroParameters(true, false));
                    }

                    nat.commit();
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.