, but the speed is slower. Bzip2 can be decompressed faster than Bzip2. But it is the slowest than other compression formats, but the compression effect is obviously the best. The decompression speed of snappy and lz4 is much better than that of lzo.
Splittable indicates whether the compression format can be split, that is, whether the data can be read immediately. Whether the compressed data can be used by mapreduce is critical to splitting the compr
compression speed. But it's the slowest one, but the compression effect is obviously the best. Snappy and lz4 are much better at decompression than Lzo.
The splittable indicates whether the compressed format can be split, that is, whether it is supported and read immediately. Whether compressed data can be mapreduce or not, compressing data can be segmented is critical.
For example, an uncompressed file has a 1GB size and the default block size of
effective, but slower. Bzip2 's decompression speed is faster than it compresses. However, compared with other compression formats is the slowest, but the compression effect is clearly the best . Snappy and LZ4 have a much better decompression speed than lzo.4. splittable indicates whether the compression format can be split , that is, whether random reads are supported. Whether compressed data can be used by mapreduce and whether compressed data can
Copy codeThe Code is as follows:Call PROCEDURE_split ('share, code, fragment ',',');Select * from splittable;
Copy codeThe Code is as follows:Drop PROCEDURE if exists procedure_split;Create procedure 'Procedure _ split '(Inputstring varchar (1000 ),Delim char (1))BeginDeclare strlen int DEFAULT length (inputstring );Declare last_index int DEFAULT 0;Declare cur_index int DEFAULT 1;Declare cur_char VARCHAR (200 );Declare len int;Drop temporary table if
Use cursor to convert the format of specified fields in the data table in Oracle (pinyin to numbers)
Application Scenario: Convert [sannanyinv] In the NNDP field of the Oracle Data Table TB_USER to [3 male and 1 female]
Main Script: A cursor script + split string Function + pinyin to digital script
The procedure is as follows:
1. Creation typeCreate or replace type splitTable is table of varchar2 (100 );
2. Create the fn_splitString function (which sp
Use cursor to convert the format of specified fields in the data table in Oracle (pinyin to numbers)
Use cursor to convert the format of specified fields in the data table in Oracle (pinyin to numbers)
Application Scenario: Convert [sannanyinv] In the NNDP field of the Oracle Data Table TB_USER to [3 male and 1 female]
Main Script: A cursor script + split string Function + pinyin to digital script
The procedure is as follows:
1. Creation typeCreate or replace type
Scenario: convert [SANNANYINV] to [3 male 1 female] in the contents of the field NNDP in datasheet tb_userMain script: A cursor script + split string function + Pinyin to digital scriptThe procedure is as follows:1. Create a TypeCreate or Replace type splittable is table of VARCHAR2 (100);2. Create function fn_splitstring (function is to split the string into multiple records)--Test Statement SELECT * FROM table (fn_splitstring (' Ernanyinv ', ' nan '
MySQL string segmentation user-defined function bitsCN.com
/*** Method 1 */select * from dbo. split ('01 _ 02000003 ',' _ ') error. the returned result is not the result we originally wanted: ------------------- -- expected result 01 02 03 ----------------- -- actual result: 01 _ 02 _ 03 I have written a similar string segmentation UDF before, and I have never thought about the problem above. My original FUNCTION is like this:/* StringToTable */create function StringToTable (@ StringX varchar (8
1.fun_split split string to form a return tableCREATEFUNCTION [dbo].[Fun_split]( @Items VARCHAR(MAX), @SplitStr VARCHAR(MAX))RETURNS @SplitTable TABLE(ItemVARCHAR(MAX)) asBEGIN DECLARE @Split_Index INT=0; DECLARE @Split_len INT=0; SET @Items = RTRIM(LTRIM(@Items)); SET @Split_Index = CHARINDEX(@SplitStr,@Items); SET @Split_len=LEN(@SplitStr); while(@Split_Index>=1) BEGIN INSERT into @
Mysql uses the stored procedure to achieve the effect similar to split. Foreground: the keywords in the database are separated by ";", and the query result set is sorted in descending order according to the number of keyword frames, and display it on the page according to a single keyword. The following is the Stored PROCEDURE Java code create procedure 'proc _ split '(inputstring varchar (1000), delim char (1 )) not deterministic contains SQL SECURITY DEFINER COMMENT ''begin declare strlen int;
Use cursor to convert the format of specified fields in the data table in Oracle (pinyin to numbers)
Application Scenario: Convert [sannanyinv] to [3 male and 1 female] In the NNDP field of the data table TB_USER.
Main Script: A cursor script + split string Function + pinyin to digital script
The procedure is as follows:
1. Creation type
2. Create the fn_splitString function (which splits the string into multiple records)
-- Fn_splitString function script code
Return
Commonly used.
IF OBJECT_ID (n'fn _ split ') IS NOT NULLDrop function fn_splitGoCREATE function dbo. fn_split(@ Inputstr varchar (8000 ),@ Seprator varchar (10 ),@ P int -- the number of data records to be retrieved, starting from 0. If you want to return the split array list, clear and delete it -- #)Returns @ temp table (a varchar (200 ))As
BeginDeclare @ I intDeclare @ n int -- record the number of cyclesSet @ inputstr = rtrim (ltrim (@ inputstr ))Set @ I = charindex (@ seprator, @ inputstr)S
Specific ways to split string functions in a SQL Server database:
CREATE FUNCTION uf_strsplit ' 1.1.2.50 ', '. '(@origStr varchar (7000),--the string to be split@markStr varchar (100))--split mark, such as ', 'RETURNS @splittable Table(STR_ID varchar (4000) not NULL,--numbered IDString varchar not NULL--split strings)AsBEGINdeclare @strlen int, @postion int, @start int, @sublen int,@TEMPstr varchar, @TEMPid intSELECT @strlen =len (@origStr), @start =
Create FUNCTION [dbo].[splittable](@s varchar(Max),--string to be split@split varchar(Ten)--Data Separators)RETURNS @re TABLE(IDint IDENTITY(1,1), colvarchar(Max))--Create a temporary table save the split character asBEGIN DECLARE @splitlen int SET @splitlen=LEN(@split+'a')-2 while CHARINDEX(@split,@s)>0 BEGIN INSERT @re VALUES( Left(@s,CHARINDEX(@split,@s)-1)) SET @s=STUFF(@s,1,CHARINDEX(@split,@s)+@splitlen,"')
cluster.
Nnbench
A benchmark that stresses the namenode.
Testbigmapoutput
A map/reduce program that works on a very big non-splittable file and does identity MAP/reduce
Testfilesystem
A test for filesystem read/write.
Testrpc
A test for RPC
Testsequencefile
A test for flat files of binary key value pairs.
Threadedmapbench:
A map/reduce benchmark that compares the performance of m
approach. For large, borderless files, such as log files, the following options are available.Stores the uncompressed files.Use a compression format that supports the split mechanism, such as bzip2.Split the file into several large chunks in the app, and then compress each block of data separately using any of the supported compression formats (regardless of whether the compression format supports splitting). Here, you need to select the size of the data block to make the compressed data block
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.