You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I am failing to print the values that I get from the Get operation for the key value pairs.
// Get Operation begins hereOpStatusget_status[num_ops];
for (i=0; i<num_ops; i++)
{
get_status[i] = (OpStatus)
{
.sem=KineticSemaphore_Create(),
.status=KINETIC_STATUS_INVALID,
};
};
uint8_ttag_data[] = {0x00, 0x01, 0x02, 0x03};
ByteBuffertag=ByteBuffer_Create(tag_data, sizeof(tag_data), sizeof(tag_data));
for ( i=0; i<num_ops; i++)
{
value_data[6] ='0'+i;
ByteBuffervalue=ByteBuffer_MallocAndAppend(value_data, sizeof(value_data));
ByteBuffergettag=ByteBuffer_Malloc(tag.bytesUsed);
ByteBuffergetvalue=ByteBuffer_Malloc(value.bytesUsed);
key_data[4] ='0'+i;
ByteBufferkey=ByteBuffer_MallocAndAppend(key_data, sizeof(key_data));
KineticEntryentry=
{
.key=key,
.tag=gettag,
.algorithm=KINETIC_ALGORITHM_SHA1,
.value=getvalue,
.force= true,
};
temp_closures= (KineticCompletionClosure)
{
.callback=op_finished,
.clientData=&get_status[i],
};
KineticStatusstatus_get=KineticClient_Get(session, &entry, &temp_closures);
if (status_get!=KINETIC_STATUS_SUCCESS)
{
fprintf(stderr, "Get failed w/status: %s\n", Kinetic_GetStatusDescription(status));
return1;
}
**// Correct value is not getting printed**__// This line should produce valueX01 and so on for the keys that I am giving__printf (" returned key is %"PRIu8"\n", *(getvalue.array.data));
}
num_failures=0;
for (i=0; i<num_ops; i++)
{
KineticSemaphore_WaitForSignalAndDestroy(get_status[i].sem);
if (get_status[i].status!=KINETIC_STATUS_SUCCESS)
{
fprintf(stderr, "PUT %zu of %zu failed w/status: %s\n",
i+1, num_ops, Kinetic_GetStatusDescription(get_status[i].status));
num_failures++;
}
}
What is the error here? Why am I not able to print the values ?
What is the correct method to get the values back for the given keys?
This is the output I am getting
10, 10, 1, 1
========================================
Throughput Test
========================================
Entry Size: 10 bytes
Count: 10 entries
Random_Keys: 1
Logging kinetic-c output to console (stdout) w/ log_level=1
1445712197.158015 kinetic-c version: v0.12.0 (protocol: v3.0.5, commit: e7b9a86b6ecf675d421a8a927f46b9bc83007bd8)
1445712197.162627 Connecting to XXX.XX.XX.XX:8123
1445712197.163360 Successfully connected to XXX.XX.XX.XX:8123 (fd=267)
1445712197.164934 Received connection ID 749851421 for session 0x2191660
the string value is valueX0
the string value is valueX1
the string value is valueX2
the string value is valueX3
the string value is valueX4
the string value is valueX5
the string value is valueX6
the string value is valueX7
the string value is valueX8
the string value is valueX9
returned key is 0
returned key is 0
returned key is 0
returned key is 0
returned key is 0
returned key is 0
returned key is 0
returned key is 0
returned key is 0
returned key is 0
1445712197.773922 Closing socket with fd=267
I am trying to attach the .c file with this snippet but the forum is not allowing me to do so. How can I send you the code so that you could run it and check ?
Regards
The text was updated successfully, but these errors were encountered:
Hello,
I am failing to print the values that I get from the Get operation for the key value pairs.
What is the error here? Why am I not able to print the values ?
What is the correct method to get the values back for the given keys?
I am trying to attach the .c file with this snippet but the forum is not allowing me to do so. How can I send you the code so that you could run it and check ?
Regards
The text was updated successfully, but these errors were encountered: