本文整理汇总了C++中MesosExecutorDriver类的典型用法代码示例。如果您正苦于以下问题:C++ MesosExecutorDriver类的具体用法?C++ MesosExecutorDriver怎么用?C++ MesosExecutorDriver使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了MesosExecutorDriver类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
/*
* Class: mesos_MesosExecutorDriver
* Method: join
* Signature: ()I
*/
JNIEXPORT jint JNICALL Java_mesos_MesosExecutorDriver_join
(JNIEnv *env, jobject thiz)
{
jclass clazz = env->GetObjectClass(thiz);
jfieldID __driver = env->GetFieldID(clazz, "__driver", "J");
MesosExecutorDriver *driver = (MesosExecutorDriver *)
env->GetLongField(thiz, __driver);
return driver->join();
}
示例2:
/*
* Class: org_apache_mesos_MesosExecutorDriver
* Method: join
* Signature: ()Lorg/apache/mesos/Protos/Status;
*/
JNIEXPORT jobject JNICALL Java_org_apache_mesos_MesosExecutorDriver_join
(JNIEnv* env, jobject thiz)
{
jclass clazz = env->GetObjectClass(thiz);
jfieldID __driver = env->GetFieldID(clazz, "__driver", "J");
MesosExecutorDriver* driver =
(MesosExecutorDriver*) env->GetLongField(thiz, __driver);
Status status = driver->join();
return convert<Status>(env, status);
}
示例3: temp
/*
* Class: org_apache_mesos_MesosExecutorDriver
* Method: sendFrameworkMessage
* Signature: ([B)I
*/
JNIEXPORT jint JNICALL Java_org_apache_mesos_MesosExecutorDriver_sendFrameworkMessage
(JNIEnv* env, jobject thiz, jbyteArray jdata)
{
// Construct a C++ string from the Java byte array.
jbyte* data = env->GetByteArrayElements(jdata, NULL);
jsize length = env->GetArrayLength(jdata);
string temp((char*) data, (size_t) length);
env->ReleaseByteArrayElements(jdata, data, 0);
// Now invoke the underlying driver.
jclass clazz = env->GetObjectClass(thiz);
jfieldID __driver = env->GetFieldID(clazz, "__driver", "J");
MesosExecutorDriver* driver =
(MesosExecutorDriver*) env->GetLongField(thiz, __driver);
return driver->sendFrameworkMessage(temp);
}