Automic Workload Automation

  • 1.  Hidden limit to SearchObject results (5000) -- workaround?

    Posted Mar 27, 2017 02:18 PM
    I am writing some reporting classes and have found that SearchObject queries appear to cap at 5000.  Is this a default value based on SQL settings, is there another way to increase or remove the limit, or do I need to create a work-around and iterate through each given root folder for JOBS objects (hoping any given team will not have more than 5000 objects)?

    Example:
    SearchObject findJobs = new SearchObject(); findJobs.setTypeJOBS(true); conn.sendRequestAndWait(findJobs);            List<String[]> jobsInfo = new ArrayList<String[]>(); jobsInfo.add(new String[] {"Job","Title","Host","Login","Created","Last Modified"});            Iterator<SearchResultItem> foundJobs = findJobs.resultIterator(); int jobsCount = 0; while (foundJobs.hasNext()) {      OpenObject openJob = new OpenObject(new UC4ObjectName(foundJobs.next().getName()), true, true);      try {           conn.sendRequestAndWait(openJob);           if (openJob.getMessageBox() == null) {                Job job = (Job) openJob.getUC4Object();                jobsInfo.add(new String[] {job.getName(),job.header().getTitle(),job.attributes().getHost().toString(),job.attributes().getLogin().toString(),job.header().getCreated(),job.header().getLastModified()});           }      } catch (TimeoutException | IOException | InvalidUC4NameException e) {           System.out.println("**Error opening object " + foundJobs.next().getName() + " on Level " + conn.getSessionInfo().getSystemName() + " Client " + conn.getSessionInfo().getClient() + "**");      }      jobsCount++; } jobsInfo.add(new String[] {""}); jobsInfo.add(new String[] {"Total Jobs: " + jobsCount});
    In this case, any Client queried that has more than 5000 JOBS objects stops reporting content at 5000 and jobsCount returns 5000.  As far as I can tell, this limit is not documented in the Javadoc

    Any information for this would be welcome.


  • 2.  Hidden limit to SearchObject results (5000) -- workaround?

    Posted Mar 27, 2017 02:23 PM
    Nevermind, found Michael Lowry's post about it: https://community.automic.com/discussion/8471/bypassing-ae-limits-in-uc-system-settings

    I'll see about getting that updated.


  • 3.  Hidden limit to SearchObject results (5000) -- workaround?

    Posted Mar 27, 2017 03:01 PM
    At least for the UI search you can raise the limit up to 20.000 in UC_SYSTEM_SETTINGS (V10 and above)

    that should be enough for common searches ;-)

    https://docs.automic.com/documentation/WEBHELP/English/AWA/11.2/AE/11.2/All%20Guides/help.htm#ucabcf.htm?Highlight=search%205000



  • 4.  Hidden limit to SearchObject results (5000) -- workaround?

    Posted Mar 27, 2017 05:08 PM
    Well, we increased it to 10000 to start, but I also modified the code to hunt by base folder as well, which means that a given team would have to own that many JOBS before it becomes a concern again.  I think I'm in the clear on that one (for now).

    SearchObject findFolders = new SearchObject(); findFolders.setTypeFOLD(true); findFolders.setSearchLocation("/", false); conn.sendRequestAndWait(findFolders);            int jobsCount = 0; FolderTree tree = new FolderTree(); conn.sendRequestAndWait(tree); List<String[]> jobsInfo = new ArrayList<String[]>(); Iterator<SearchResultItem> foundFolders = findFolders.resultIterator(); while (foundFolders.hasNext()) {      String folderName = foundFolders.next().getName();      SearchObject findJobs = new SearchObject();      findJobs.setTypeJOBS(true);      findJobs.setSearchLocation(tree.getFolder("/" + folderName + "/").fullPath().toString(), true);      conn.sendRequestAndWait(findJobs);                      Iterator<SearchResultItem> foundJobs = findJobs.resultIterator();      while (foundJobs.hasNext()) {           OpenObject openJob = new OpenObject(new UC4ObjectName(foundJobs.next().getName()), true, true);           try {                conn.sendRequestAndWait(openJob);                if (openJob.getMessageBox() == null) {                     Job job = (Job) openJob.getUC4Object();                     jobsInfo.add(new String[] {job.getName(),job.header().getTitle(),job.attributes().getHost().toString(),job.attributes().getLogin().toString(),job.header().getCreated(),job.header().getLastModified()});                }           } catch (TimeoutException | IOException | InvalidUC4NameException e) {                System.out.println("**Error opening object " + foundJobs.next().getName() + " on Level " + conn.getSessionInfo().getSystemName() + " Client " + conn.getSessionInfo().getClient() + "**");           }           jobsCount++;      } }           Collections.sort(jobsInfo,new Comparator<String[]>() {         public int compare(String[] strings, String[] otherStrings) {                 return strings[0].compareTo(otherStrings[0]);         } }); jobsInfo.add(0, new String[] {"Job","Title","Host","Login","Created","Last Modified"}); jobsInfo.add(new String[] {""}); jobsInfo.add(new String[] {"Total Jobs: " + jobsCount});


  • 5.  Hidden limit to SearchObject results (5000) -- workaround?

    Posted Mar 28, 2017 08:49 AM

    Michael_Coxson_5769: I submitted an enhancement request to ideas.automtic.com, requesting user/user group-level system limits. Please vote for the idea if you like it.