Start a Conversation

This post is more than 5 years old

Solved!

Go to Solution

6103

November 4th, 2008 13:00

XAM Query Problems

Having problems issuing a query. Using US2 and the PEAs xamconnect.pea and xam_default.pea (taken from the early development kit.)

XSystem Props: .xsystem.job.list.xam.job.query, .xsystem.job.xam.job.query.level1.supported, com.emc.centera.capabilities.clip-enumeration.allowed and .xsystem.auth.granule.list.job are all set to true. However, .xsystem.job.commit.supported and .xsystem.auth.granule.list.job-commit are both set to false.

Here is my psuedocode for creating the job...

XSystem_CreateXSet(hSystem, XSET_MODE_MODIFY, &hxSetJob);

XAM_CreateString (hxSetJob, XAM_JOB_COMMAND, true, XAM_JOB_QUERY);

XAM_CreateString (hxSetJob, XAM_JOB_QUERY_COMMAND, true, "SELECT \".xset.xuid\"");

XSet_SubmitJob(hxSetJob); // Returns ApiErr:1036 (xam/job command invalid)

47 Posts

November 4th, 2008 13:00

Hi Adam -

Funny coincidence - I just posted about this same issue

Best Regards,

Mike Horgan

1 Rookie

 • 

56 Posts

November 4th, 2008 14:00

Great! Fixed it!

More questions:

  1. Any recommendations on how long I should wait in between calls to get XAM_JOB_QUERY_RESULTS_COUNT?

  2. It is NOT required that the job status become COMPLETE before results are returned, correct?

  3. There is a note elsewhere that says that eclipcontent from old C-Clips cannot be queried. What about user created fields on newly created XSets? E.g. I have an XSet with a string field of "com.seven10.eas.file"? Can I query for the existence of this field? If so, would I need level 2 query support to order to query on the contents of that field?

  4. After halting the job and closing the XSet, am I responsible for deleting that XSet?

47 Posts

November 4th, 2008 14:00

Hi Adam -

Glad to hear it's working.

We don't have enough field experience to give concrete recommendations around wait time between pools of the result count; I'd say 10 - 30 seconds would be reasonable.

You can begin reading the results stream at any time; no need to wait for a COMPLETE status.

You can query all metadata properties (and their values) in non-legacy XSets; level 2 query (which we do not currently support) allows you to query the contents of non-properties (XStreams).

If you never committed the job XSet, it is not required to call delete before closing it.

Best Regards,

Mike Horgan

November 4th, 2008 16:00

in my test, i had to poll the XAM_JOB_QUERY_RESULTS_COUNT and XAM_JOB_STATUS to see the results of query rather than using timer before seeing XAM_JOB_QUERY_RESULTS_COUNT. In many conditions we won't know how long we have to wait.

1 Rookie

 • 

56 Posts

November 11th, 2008 13:00

Thought I would post some more results, thoughts and questions.

1. Queries take a long time to return results. Sometimes

so much so that I'm not sure that I formatted the string correctly.

    1. Is there any
      validation done to string to make sure it conforms to the query language and where would that reject if
      so?

    2. It seems like
      all the results are collated before any are returned. In other words, I get status of RUNNING and zero
      results until finally I get status of
      COMPLETED and all the results. Is there
      a way to get the results as they
      come in?

Here are some examples

SELECT ".xset.xuid"

Time: 3

minutes, Results: 13929

SELECT ".xset.xuid" WHERE

".xset.time.commit" >= 0 (Note: eventually the zero would increase on subsequent

calls. Just starting here to get a reference point.)

Time: 30

minutes, Results: 0 (Note: I canceled the query manually at this

point, but there should be results.)

SELECT ".xset.xuid" WHERE "com.seven10.eas.file.instance"

= 'amarcionek'"

Time: 25

minutes, Results: 0 (Note:

There should be at least a half a dozen here.)

SELECT ".xset.xuid" WHERE exists

("com.seven10.eas.file")

Time: 20

minutes, Results 0 (Note: I canceled the query manually at

this point, but there should be results.)

2. If I'm debugging my app us VS2005, and I happen to

detach from my process while the process is in the Centera_VIM, the VIM

generates an exception. I'm not sure entirely which call is doing it due to the

stack being ugly, but it happens like clockwork.

I know its either XAM_GetString/ XAM_ContainsField/

XAM_GetFieldType on the job's health and/or status or getting the

XAM_JOB_QUERY_RESULTS_COUNT.

A detach goes smoothly provided I'm not in the VIM. Any

ideas?

3. Do you have PDB files that come with the released

version of the XAM SDK? I've gotten them from someone at EMC in the past for

certain versions of the Centera SDK. They are useful when debugging for the

stack traces.

47 Posts

November 12th, 2008 06:00

Hi Adam -

In VIM 1.0, the query execution time is directly proportional to the number of clips (not XSets) resident in the target virtual pool. The 'select ".xset.xuid"' is the fastest (as you saw in your testing), all others will generally take longer but should eventually complete. Your application may be waiting quite a while (hours) to query large amounts of content.

Any more detail (like a screen capture) that you could provide on the exception would be helpful. Does the VIM actually crash in this case?

We can provide PDB files for XAM to members of our ISV program; contact your Centera CSE representative to request these.

Best Regards,

Mike Horgan

No Events found!

Top