Removing an item from an output interface in testing?

2 views
Skip to first unread message

Oren

unread,
Nov 24, 2011, 5:38:00 PM11/24/11
to programthecloud
Hello,

I have been looking through the sandbox and haven't found an example
of this.
I'm trying to figure out how to remove something from an output
interface, i.e. to 'retrieve it' so it isn't there anymore in the
bloom object, from a testing environment. Basically I am dealing with
two-phase commit, and when I run a test of one transaction it works
fine, but when I try to do another transaction, the output interface
(commit_response) thereafter continues to have the result from the
first test. That is, it isn't being removed. How do I remove that row?

I'm using sync_callback to do the test. Basically :

resps = coord.sync_callback(coord.commit_request.tabname, [[reqid]],
coord.commit_response.tabname)

(Not sure what tabname is -- could someone please clarify? I was
following the sandbox's model and it seemed to work)

So , according to what Peter said in class, that would put a row whose
contents are [reqid] onto the input interface "commit_request," and
put into "resps" the resulting rows on the output interface
"commit_response."

But, if I change reqid to a higher number later and run that line
again, commit_response still has the row from the output of the first
request.

Any thoughts on this matter would be much appreciated.
Happy Thanksgiving!

Thanks,
Oren

Oski Bear

unread,
Nov 24, 2011, 5:48:58 PM11/24/11
to program...@googlegroups.com, programthecloud
Gotta run but... Interfaces are scratches. Does that help?

Sent from a telephone.

Oren

unread,
Nov 24, 2011, 5:50:43 PM11/24/11
to programthecloud
Oops. Thanks to my partner I figured out the real issue. As it turns
out, instead of things not being removed from the output interface, it
was the case that I was putting the previous thing _back on_ the
output interface at every timestep due to the absence of a rule I
needed.
Sorry for the false alarm.

Thanks,
Oren

On Nov 24, 2:48 pm, Oski Bear <programthecl...@gmail.com> wrote:
> Gotta run but... Interfaces are scratches. Does that help?
>
> Sent from a telephone.
>

Yoriyasu Yano

unread,
Nov 24, 2011, 5:54:21 PM11/24/11
to program...@googlegroups.com
I think tabname is a string representation of the table name such that bloom understands which table to insert to which table to wait on.
More details:
  # sync_callback supports synchronous interaction with Bud modules.  The caller
  # supplies the name of an input collection, a set of tuples to insert, and an
  # output collection on which to 'listen.'  The call blocks until tuples are
  # inserted into the output collection: these are returned to the caller.
  def sync_callback(in_tbl, tupleset, out_tbl)
--
Yoriyasu Yano
University of California, Berkeley
BA Cognitive Science and Computer Science

Reply all
Reply to author
Forward
0 new messages