code: public int createLogs(String topic, final int partitions, final boolean forceEnlarge) {
          TopicNameValidator.validate(topic);
          synchronized (logCreationLock) {
              final int configPartitions = getPartition(topic);
              if (configPartitions >= partitions || !forceEnlarge) {
                  return configPartitions;
              }
              topicPartitionsMap.put(topic, partitions);
              if (config.getEnableZookeeper()) {
                  if (getLogPool(topic, 0) != null) {//created already
                      topicRegisterTasks.add(new TopicTask(TopicTask.TaskType.ENLARGE, topic));
                  } else {
                      topicRegisterTasks.add(new TopicTask(TopicTask.TaskType.CREATE, topic));
                  }
              }
              return partitions;
          }
      }
docs: create logs with given partition number
  
  @param topic        the topic name
  @param partitions   partition number
  @param forceEnlarge enlarge the partition number of log if smaller than runtime
  @return the partition number of the log after enlarging