Ensure specified keyspace exists, try to create it otherwise
@param  {Apollo~GenericCallback} callback Called on keyspace assertion
@private
332978
function(callback){

        var client = this._get_system_client();
        var keyspace_name = this._connection.keyspace,
            replication_text = '',
            options = this._options;

        replication_text = this._generate_replication_text(options.replication_strategy);

        var query = util.format(
            "CREATE KEYSPACE IF NOT EXISTS %s WITH REPLICATION = %s;",
            keyspace_name,
            replication_text
        );
        client.execute(query, function(err,result){
            client.shutdown(function(){
                callback(err,result);
            });
        });
    }
645464
@Then("^a Cassandra keyspace '(.+?)' does not exist$")
    public void assertKeyspaceOnCassandraDoesNotExist(String keyspace) {
        assertThat(commonspec.getCassandraClient().getKeyspaces()).as("The keyspace " + keyspace + " does not exist on cassandra").doesNotContain(keyspace);
    }
754278
function(callback){

    output("Initializing queries...");

    if(program.keyspace){
        batchQueries.unshift("USE " + program.keyspace + ";");
    }

    if(batchQueries && batchQueries.length > 0){
        output("Running queries...");
        executeQuery(batchQueries.shift(), callback);
    }else{
        callback("No queries to run.", null);
    }
}
224346
protected void fireSpaceAdded(Space space, boolean isLocalCreation) {
		if (this.externalListener != null) {
			this.externalListener.spaceCreated(space, isLocalCreation);
		}
	}
395705
function(key, callback) {
      api.search({
        key: key,
        limit: this.conf.CONST.SEARCH_LIMIT
      }, callback);
    }
39940
function(e) {
            var k = this._out(e.key);// undefined if key is not in the namespace
            if ((k && (!key || k === key)) && // match key if listener has one
                (!e.storageArea || e.storageArea === this._area)) {// match area, if available
                return fn.call(this, _.event.call(this, k, e));
            }
        }
669230
function(callback) {
      var i = 0,
          keys = this.keys(),
          returned;

      for (i; i < keys.length; i++) {
        returned = callback(keys[i], this.get(keys[i]));
        if (returned === false) { return false; }
      };
    }
214503
function(key, callback) {
		if (typeof data[key] == 'undefined') {
			callback && callback(null, null)
		} else if (typeof data[key] == 'string' || typeof data[key] == 'number' || typeof data[key] == 'boolean') {
			callback && callback(null, data[key])
		} else {
			callback && callback(typeError('getBytes', 'string or number', key))
		}
	}
339523
def _set_keyspace_for_all_conns(self, keyspace, callback):
        
        remaining_callbacks = set(self._connections)
        errors = []

        if not remaining_callbacks:
            callback(self, errors)
            return

        def connection_finished_setting_keyspace(conn, error):
            self.return_connection(conn)
            remaining_callbacks.remove(conn)
            if error:
                errors.append(error)

            if not remaining_callbacks:
                callback(self, errors)

        self._keyspace = keyspace
        for conn in self._connections:
            conn.set_keyspace_async(keyspace, connection_finished_setting_keyspace)
141097
@SuppressWarnings({ "unchecked", "rawtypes" })
	protected void ensureLocalSpaceDefinition(SpaceID id, Object[] initializationParameters) {
		synchronized (getSpaceRepositoryMutex()) {
			if (!this.spaces.containsKey(id)) {
				createSpaceInstance((Class) id.getSpaceSpecification(), id, false, initializationParameters);
			}
		}
	}
1138225
function (namespaces, defaultNamespace, name) {
    var self = this;

    assert(namespaces);
    assert(name);
    if (/^\{.+\}/.test(name)) {
      return name;
    }
    else if (/:/.test(name)) {
      var parts = name.split(':');
      assert(parts.length === 2, parts);
      if (!namespaces[parts[0]]) {
        throw new xml2js.ValidationError("Unknown namespace " + parts[0] + ", name: " + name + ", known namespaces: " + util.inspect(namespaces, false, null));
      }
      return '{' + namespaces[parts[0]] + '}' + parts[1];
    }
    else if (defaultNamespace) {
      return '{' + defaultNamespace + '}' + name;
    }
    else {
      throw new xml2js.ValidationError("Unqualified name and no default namespace: " + name);
    }
  }
605934
function checkSpacingForProperty(node) {
            if (node.static) {
                checkSpacingAroundFirstToken(node);
            }
            if (node.kind === "get" ||
                node.kind === "set" ||
                (
                    (node.method || node.type === "MethodDefinition") &&
                    node.value.async
                )
            ) {
                const token = sourceCode.getTokenBefore(
                    node.key,
                    tok => {
                        switch (tok.value) {
                            case "get":
                            case "set":
                            case "async":
                                return true;
                            default:
                                return false;
                        }
                    }
                );

                if (!token) {
                    throw new Error("Failed to find token get, set, or async beside method name");
                }


                checkSpacingAround(token);
            }
        }
337912
function(callback){
			var self = this;
			if(!this.id){
				return process.nextTick(function(){
					callback(new Error("Invalid session ID"));
				});
			}

			options.client.get(options.keyspace + self.id, function(error, resp){
				if(error)
					return callback(error);
				try{
					resp = JSON.parse(resp);
				}catch(e){
					return callback(e);
				}
				extendSession(self, resp);
				callback();
			});
		}
910581
function createCacheKey(namespace, args) {
  args = Array.prototype.slice.apply(args);
  return namespace + '(' + _.map(args, function(a){ return JSON.stringify(a); }).join(',') + ')';
}
180789
function checkForSpacesAfterAwait(node) {
            const tokens = sourceCode.getFirstTokens(node, 3);

            checkUnaryWordOperatorForSpaces(node, tokens[0], tokens[1], "await");
        }
972725
function isAutostartEnabled(key, callback) {
  if (arguments.length < 1) {
    throw new Error('Not enough arguments passed to isAutostartEnabled()');
  } else if (typeof key !== 'string') {
    throw new TypeError('Passed "key" to disableAutostart() is not a string.');
  }

  if (typeof callback !== 'function') {
    return new Promise((resolve, reject) => {
      autostart.isAutostartEnabled(key, (error, isEnabled) => {
        if (error) {
          reject(error);
        } else {
          resolve(isEnabled);
        }
      });
    });
  }

  autostart.isAutostartEnabled(key, (error, isEnabled) => {
    callback(error, isEnabled);
  });
}
984256
function assertion(keys) {
  var missing = keys.filter(isMissing);

  if (missing.length) {
    throw new ReferenceError(format(message, missing.join(', ')));
  }
}