Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/cplusplus/136.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ 由于初始化失败--C++;客户_C++_Aerospike - Fatal编程技术网

C++ 由于初始化失败--C++;客户

C++ 由于初始化失败--C++;客户,c++,aerospike,C++,Aerospike,就在我开始与aerospike合作的前一天。我在使用LDT(大数据类型——大列表)编写一个示例时遇到了一些问题。我想创建一个带有currdate的键,并附加为键(20160419_2000_列表),稍后我将添加原始数据(字节数组)作为列表值。 为此,我能够正确连接数据库,但无法为列表创建键。你能在这方面指导我吗。 你可以参考下面的代码来了解我到底在做什么 m_sTFPKeyStr.assign(datevalue); //datavalue consists datatime string

就在我开始与aerospike合作的前一天。我在使用LDT(大数据类型——大列表)编写一个示例时遇到了一些问题。我想创建一个带有currdate的键,并附加为键(20160419_2000_列表),稍后我将添加原始数据(字节数组)作为列表值。 为此,我能够正确连接数据库,但无法为列表创建键。你能在这方面指导我吗。 你可以参考下面的代码来了解我到底在做什么

 m_sTFPKeyStr.assign(datevalue);  //datavalue consists datatime string
        m_sTFPListStr.assign("List_");
        m_sTFPListStr.append(datevalue);
        as_key_init_str(&m_sTFPKey, m_sInputNameSpace.c_str(), m_sInputSetName.c_str(), m_sTFPKeyStr.c_str());

        if (!as_ldt_init(m_sTFPListKey, m_sTFPListStr.c_str(), AS_LDT_LLIST, NULL))
        {
            memset(logmessage, 0x0, sizeof(logmessage));
            sprintf(logmessage, "CDataBaseManager::SaveTFP Fails to initialize tfplist key %s", m_sTFPListStr.c_str());
            m_pCaptureManager->m_pLogMgr->LogMsg(logmessage);
            return;
        }

检查代码中
m_sTFPListStr
的长度

功能代码
为\u ldt\u init
,用于检查参数:

as_ldt * as_ldt_init(as_ldt * ldt, const as_bin_name name, const as_ldt_type type, const as_udf_module_name module)
{
  if (!name || name[0] == '\0' || strlen(name) > AS_BIN_NAME_MAX_LEN
     || (module && strlen(module) > AS_UDF_MODULE_MAX_LEN) )
  {
    return NULL;
  }
  ...
}
作为As_BIN_NAME_MAX_LEN的值:

#define AS_BIN_NAME_MAX_LEN (AS_BIN_NAME_MAX_SIZE - 1)
#define AS_BIN_NAME_MAX_SIZE 15

有没有理由不使用常规列表和原子列表操作来执行此操作?您需要什么样的LList功能?