Return-Path: X-Original-To: apmail-ambari-dev-archive@www.apache.org Delivered-To: apmail-ambari-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5F1EE10FF5 for ; Tue, 20 Oct 2015 14:04:26 +0000 (UTC) Received: (qmail 85064 invoked by uid 500); 20 Oct 2015 14:04:04 -0000 Delivered-To: apmail-ambari-dev-archive@ambari.apache.org Received: (qmail 85030 invoked by uid 500); 20 Oct 2015 14:04:04 -0000 Mailing-List: contact dev-help@ambari.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ambari.apache.org Delivered-To: mailing list dev@ambari.apache.org Received: (qmail 85016 invoked by uid 99); 20 Oct 2015 14:04:03 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Oct 2015 14:04:03 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id BD99F2781AB; Tue, 20 Oct 2015 14:04:03 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============5809892807738691745==" MIME-Version: 1.0 Subject: Re: Review Request 39478: MySQL Ambari Repository gives Key Too Long error messages for hostcomponentdesiredstate table. From: "Vitalyi Brodetskyi" To: "Myroslav Papirkovskyy" , "Vitalyi Brodetskyi" Cc: "Dmitro Lisnichenko" , "Ambari" Date: Tue, 20 Oct 2015 14:04:03 -0000 Message-ID: <20151020140403.1667.71216@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org/ Auto-Submitted: auto-generated Sender: "Vitalyi Brodetskyi" X-ReviewGroup: Ambari X-Auto-Response-Suppress: DR, RN, OOF, AutoReply X-ReviewRequest-URL: https://reviews.apache.org/r/39478/ X-Sender: "Vitalyi Brodetskyi" References: <20151020140155.1666.89260@reviews.apache.org> In-Reply-To: <20151020140155.1666.89260@reviews.apache.org> Reply-To: "Vitalyi Brodetskyi" X-ReviewRequest-Repository: ambari --===============5809892807738691745== MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/39478/#review103253 ----------------------------------------------------------- Ship it! Ship It! - Vitalyi Brodetskyi On Жов. 20, 2015, 2:01 після полудня, Dmitro Lisnichenko wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/39478/ > ----------------------------------------------------------- > > (Updated Жов. 20, 2015, 2:01 після полудня) > > > Review request for Ambari, Myroslav Papirkovskyy and Vitalyi Brodetskyi. > > > Bugs: AMBARI-13489 > https://issues.apache.org/jira/browse/AMBARI-13489 > > > Repository: ambari > > > Description > ------- > > Problem: > > MySQL Ambari Repository gives Key Too Long error messages for hostcomponentdesiredstate table. > > Steps To Reproduce: > > The comment in the Ambari-DDL-MySQL-CREATE.sql file indicates that the script was generated on a MySQL DB with UTF8 as the character set. > > The default collation name for the DB is utf8_general_ci > > I suspect that this is preventing me from creating the Ambari database schema and giving the message that the maximum key size is 1000 bytes. > > If the VARCHAR fields use more than one byte per character then two VARCHAR(255) fields in the key is going to exceed 1000 bytes. > > CREATE TABLE hostcomponentdesiredstate ( > cluster_id BIGINT NOT NULL, > component_name VARCHAR(255) NOT NULL, > desired_stack_id BIGINT NOT NULL, > desired_state VARCHAR(255) NOT NULL, > host_id BIGINT NOT NULL, > service_name VARCHAR(255) NOT NULL, > admin_state VARCHAR(32), > maintenance_state VARCHAR(32) NOT NULL DEFAULT 'ACTIVE', > security_state VARCHAR(32) NOT NULL DEFAULT 'UNSECURED', > restart_required TINYINT(1) NOT NULL DEFAULT 0, > PRIMARY KEY (cluster_id, component_name, host_id, service_name) > ); > > > Their is a work around of using MySQL 5.6 which is not the default for Cent OS 6. You also need to make a manual configuration change of innodb_large_prefix property. This is very ugly for installation process. > > > Diffs > ----- > > ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql c82a584 > > Diff: https://reviews.apache.org/r/39478/diff/ > > > Testing > ------- > > mvn clean test > > > Thanks, > > Dmitro Lisnichenko > > --===============5809892807738691745==--