All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.apache.flink.runtime.state.gemini.engine.page.PageConstants Maven / Gradle / Ivy

There is a newer version: 1.5.1
Show newest version
/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.apache.flink.runtime.state.gemini.engine.page;

/**
 * PageConstants.
 */
public class PageConstants {
	public static final int NO_PAGE = -1;
	public static final long NO_RUNNING_SNAPHOST = -1;

	/*used by PageIndexHashImpl*/
	public static final int DEFAULT_BUCKET_NUM = 1;
	public static final int DEFAULT_LOGIC_TABLE_CHAIN_LEN = 3;
	public static final int WAIT_SPITTING = -2;

	public static final int PAGE_ID_BYTES_MARK = 0x3FFFFFF;
	public static final int PAGE_ID_BITS = 26;

	//memory
	public static final float DEFAULT_TOTAL_WRITEBUFFER_RATE = 0.05f;
	public static final float DEFAULT_TOTAL_HEAP_RATE = 0.5f;
	public static final float DEFAULT_TOTAL_HEAP_LOW_MARK_RATE = 0.6f;
	public static final float DEFAULT_TOTAL_HEAP_MIDDLE_MARK_RATE = 0.65f;
	public static final float DEFAULT_TOTAL_HEAP_HIGH_MARK_RATE = 0.7f;
	public static final float DEFAULT_PAGE_SIZE_RATE_BETWEEN_POJO_HEAP = 10.0f;
	public static final float DEFAULT_TOTAL_POJO_PAGE_USED_RATE = 0.5f;
	public static final int DEFAULT_EVICT_CHAIN_LEN = 3;
	public static final int DEFAULT_EVICT_PAGE_MIN_LIFE = 10000; //10 s
	public static final int DEFAULT_EVICT_ONCE_RUN_TIME = 5000; //5 s
	public static final int DEFAULT_EVICT_PAGE_MIN_CANDIDATE_LEN = 10;

	//page
	public static final long PAGE_ADDRESS_FOUR_BYTES_MARK = 0xFFFFFFFF;
	public static final int DEFAULT_SPILLED_PAGE_SIZE_HIGH_THRESHOLD = 131072;
	public static final int DEFAULT_SPILLED_PAGE_SIZE_MIDDLE_THRESHOLD = 65536;
	public static final int DEFAULT_SPILLED_PAGE_SIZE_LOW_THRESHOLD = 65536;
	public static final int DEFAULT_INDEX_COUNT_HIGH_MARK = 524288;
	public static final int DEFAULT_INDEX_COUNT_LOW_MARK = 262144;
	public static final int DEFAULT_MIN_COMPACTION_CHAIN_THRESHOLD = 3;
	public static final int DEFAULT_NORMAL_FLUSH_PAGE_NUM = 100;
	public static final int DEFAULT_NORMAL_FLUSH_SIZE_RATE = 10;
	public static final int DEFAULT_NORMAL_SCAN_PAGE_NUM = 100;

	//PageStatus
	public static final int PAGE_SIZE_BYTES_MARK = 0xFFFFFF;
	public static final int PAGE_SIZE_INIT_MARK = 0xFF000000;
	public static final int PAGE_SIZE_BITS = 24;

	//GeminiConfig
	public static final int DEFAULT_TTL = 259200;
	public static final int DEFAULT_WRITEBUFFER_WATER_MARK = 16000;

	//Bytes page
	private static final int INDEX_START_OFFSET = 64;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy