关闭

关闭

封号提示

内容

首页 OReilly.Cassandra.The.Definitive.Guide.2010.pdf

OReilly.Cassandra.The.Definitive.Guide.2010.pdf

OReilly.Cassandra.The.Definitiv…

上传者: ronnin.lee 2012-02-14 评分 5 0 153 21 696 暂无简介 简介 举报

简介:本文档为《OReilly.Cassandra.The.Definitive.Guide.2010pdf》,可适用于IT/计算机领域,主题内容包含Cassandra:TheDefinitiveGuideCassandra:TheDefinitiveGuideEbenHewittBeijing•符等。

Cassandra:TheDefinitiveGuideCassandra:TheDefinitiveGuideEbenHewittBeijing•Cambridge•Farnham•Köln•Sebastopol•TokyoCassandra:TheDefinitiveGuidebyEbenHewittCopyrightEbenHewittAllrightsreservedPrintedintheUnitedStatesofAmericaPublishedbyO’ReillyMedia,Inc,GravensteinHighwayNorth,Sebastopol,CAO’Reillybooksmaybepurchasedforeducational,business,orsalespromotionaluseOnlineeditionsarealsoavailableformosttitles(http:mysafaribooksonlinecom)Formoreinformation,contactourcorporateinstitutionalsalesdepartment:()orcorporateoreillycomEditor:MikeLoukidesProductionEditor:HollyBauerCopyeditor:Genevieved’EntremontProofreader:EmilyQuillIndexer:EllenTroutmanZaigCoverDesigner:KarenMontgomeryInteriorDesigner:DavidFutatoIllustrator:RobertRomanoPrintingHistory:November:FirstEditionNutshellHandbook,theNutshellHandbooklogo,andtheO’ReillylogoareregisteredtrademarksofO’ReillyMedia,IncCassandra:TheDefinitiveGuide,theimageofaParadiseflycatcher,andrelatedtradedressaretrademarksofO’ReillyMedia,IncManyofthedesignationsusedbymanufacturersandsellerstodistinguishtheirproductsareclaimedastrademarksWherethosedesignationsappearinthisbook,andO’ReillyMedia,Incwasawareofatrademarkclaim,thedesignationshavebeenprintedincapsorinitialcapsWhileeveryprecautionhasbeentakeninthepreparationofthisbook,thepublisherandauthorassumenoresponsibilityforerrorsoromissions,orfordamagesresultingfromtheuseoftheinformationcontainedhereinTMThisbookusesRepKover,adurableandflexiblelayflatbindingISBN:MThisbookisdedicatedtomysweetheart,AlisonBrownIcanhearthesoundofviolins,longbeforeitbeginsTableofContentsForewordxvPrefacexviiIntroducingCassandraWhat’sWrongwithRelationalDatabasesAQuickReviewofRelationalDatabasesRDBMS:TheAwesomeandtheNotSoMuchWebScaleTheCassandraElevatorPitchCassandrainWordsorLessDistributedandDecentralizedElasticScalabilityHighAvailabilityandFaultToleranceTuneableConsistencyBrewer’sCAPTheoremRowOrientedSchemaFreeHighPerformanceWhereDidCassandraComeFromUseCasesforCassandraLargeDeploymentsLotsofWrites,Statistics,andAnalysisGeographicalDistributionEvolvingApplicationsWhoIsUsingCassandraSummaryInstallingCassandraInstallingtheBinaryExtractingtheDownloadviiWhat’sInThereBuildingfromSourceAdditionalBuildTargetsBuildingwithMavenRunningCassandraOnWindowsOnLinuxStartingtheServerRunningtheCommandLineClientInterfaceBasicCLICommandsHelpConnectingtoaServerDescribingtheEnvironmentCreatingaKeyspaceandColumnFamilyWritingandReadingDataSummaryTheCassandraDataModelTheRelationalDataModelASimpleIntroductionClustersKeyspacesColumnFamiliesColumnFamilyOptionsColumnsWideRows,SkinnyRowsColumnSortingSuperColumnsCompositeKeysDesignDifferencesBetweenRDBMSandCassandraNoQueryLanguageNoReferentialIntegritySecondaryIndexesSortingIsaDesignDecisionDenormalizationDesignPatternsMaterializedViewValuelessColumnAggregateKeySomeThingstoKeepinMindSummaryviii|TableofContentsSampleApplicationDataDesignHotelAppRDBMSDesignHotelAppCassandraDesignHotelApplicationCodeCreatingtheDatabaseDataStructuresGettingaConnectionPrepopulatingtheDatabaseTheSearchApplicationTwissandraSummaryTheCassandraArchitectureSystemKeyspacePeertoPeerGossipandFailureDetectionAntiEntropyandReadRepairMemtables,SSTables,andCommitLogsHintedHandoffCompactionBloomFiltersTombstonesStagedEventDrivenArchitecture(SEDA)ManagersandServicesCassandraDaemonStorageServiceMessagingServiceHintedHandoffManagerSummaryConfiguringCassandraKeyspacesCreatingaColumnFamilyTransitioningfromtoReplicasReplicaPlacementStrategiesSimpleStrategyOldNetworkTopologyStrategyNetworkTopologyStrategyReplicationFactorIncreasingtheReplicationFactorPartitionersTableofContents|ixRandomPartitionerOrderPreservingPartitionerCollatingOrderPreservingPartitionerByteOrderedPartitionerSnitchesSimpleSnitchPropertyFileSnitchCreatingaClusterChangingtheClusterNameAddingNodestoaClusterMultipleSeedNodesDynamicRingParticipationSecurityUsingSimpleAuthenticatorProgrammaticAuthenticationUsingMDEncryptionProvidingYourOwnAuthenticationMiscellaneousSettingsAdditionalToolsViewingKeysImportingPreviousConfigurationsSummaryReadingandWritingDataQueryDifferencesBetweenRDBMSandCassandraNoUpdateQueryRecordLevelAtomicityonWritesNoServerSideTransactionSupportNoDuplicateKeysBasicWritePropertiesConsistencyLevelsBasicReadPropertiesTheAPIRangesandSlicesSetupandInsertingDataUsingaSimpleGetSeedingSomeValuesSlicePredicateGettingParticularColumnNameswithGetSliceGettingaSetofColumnswithSliceRangeGettingAllColumnsinaRowGetRangeSlicesMultigetSlicex|TableofContentsDeletingBatchMutatesBatchDeletesRangeGhostsProgrammaticallyDefiningKeyspacesandColumnFamiliesSummaryClientsBasicClientAPIThriftThriftSupportforJavaExceptionsThriftSummaryAvroAvroAntTargetsAvroSpecificationAvroSummaryABitofGitConnectingClientNodesClientListRoundRobinDNSLoadBalancerCassandraWebConsoleHector(Java)FeaturesTheHectorAPIHectorSharp(C#)ChirperChiton(Python)Pelops(Java)Kundera(JavaORM)Fauna(Ruby)SummaryMonitoringLoggingTailingGeneralTipsOverviewofJMXandMBeansMBeansIntegratingJMXInteractingwithCassandraviaJMXCassandra’sMBeansTableofContents|xiorgapachecassandraconcurrentorgapachecassandradborgapachecassandragmsorgapachecassandraserviceCustomCassandraMBeansRuntimeAnalysisToolsHeapAnalysiswithJMXandJHATDetectingThreadProblemsHealthCheckSummaryMaintenanceGettingRingInformationInfoRingGettingStatisticsUsingcfstatsUsingtpstatsBasicMaintenanceRepairFlushCleanupSnapshotsTakingaSnapshotClearingaSnapshotLoadBalancingtheClusterloadbalanceandstreamsDecommissioningaNodeUpdatingNodesRemovingTokensCompactionThresholdChangingColumnFamiliesinaWorkingClusterSummaryPerformanceTuningDataStorageReplyTimeoutCommitLogsMemtablesConcurrencyCachingBufferSizesUsingthePythonStressTestxii|TableofContentsGeneratingthePythonThriftInterfacesRunningthePythonStressTestStartupandJVMSettingsTuningtheJVMSummaryIntegratingHadoopWhatIsHadoopWorkingwithMapReduceCassandraHadoopSourcePackageRunningtheWordCountExampleOutputtingDatatoCassandraHadoopStreamingToolsAboveMapReducePigHiveClusterConfigurationUseCasesRaptrcom:KeithThornhillImagini:DaveGardnerSummaryAppendix:TheNonrelationalLandscapeGlossaryIndexTableofContents|xiiiForewordCassandrawasopensourcedbyFacebookinJulyThisoriginalversionofCassandrawaswrittenprimarilybyanexemployeefromAmazonandonefromMicrosoftItwasstronglyinfluencedbyDynamo,Amazon’spioneeringdistributedkeyvaluedatabaseCassandraimplementsaDynamostylereplicationmodelwithnosinglepointoffailure,butaddsamorepowerful“columnfamily”datamodelIbecameinvolvedinDecemberofthatyear,whenRackspaceaskedmetobuildthemascalabledatabaseThiswasgoodtiming,becausealloftoday’simportantopensourcescalabledatabaseswereavailableforevaluationDespiteinitiallyhavingonlyasinglemajorusecase,Cassandra’sunderlyingarchitecturewasthestrongest,andIdirectedmyeffortstowardimprovingthecodeandbuildingacommunityCassandrawasacceptedintotheApacheIncubator,andbythetimeitgraduatedinMarch,ithadbecomeatrueopensourcesuccessstory,withcommittersfromRackspace,Digg,Twitter,andothercompaniesthatwouldn’thavewrittentheirowndatabasefromscratch,buttogetherbuiltsomethingimportantToday’sCassandraismuchmorethantheearlysystemthatpowered(andstillpowers)Facebook’sinboxsearchithasbecome“thehandsdownwinnerfortransactionprocessingperformance,”toquoteTonyBain,withadeservedreputationforreliabilityandperformanceatscaleAsCassandramaturedandbeganattractingmoremainstreamusers,itbecameclearthattherewasaneedforcommercialsupportthus,MattPfeilandIcofoundedRiptanoinAprilHelpingdriveCassandraadoptionhasbeenveryrewarding,especiallyseeingtheusesthatdon’tgetdiscussedinpublicAnotherneedhasbeenabooklikethisoneLikemanyopensourceprojects,Cassandra’sdocumentationhashistoricallybeenweakAndevenwhenthedocumentationultimatelyimproves,abooklengthtreatmentlikethiswillremainusefulxvThankstoEbenfortacklingthedifficulttaskofdistillingtheartandscienceofdevelopingagainstanddeployingCassandraYou,thereader,havetheopportunitytolearnthesenewconceptsinanorganizedfashionJonathanEllisProjectChair,ApacheCassandra,andCofounder,Riptanoxvi|ForewordPrefaceWhyApacheCassandraApacheCassandraisafree,opensource,distributeddatastoragesystemthatdifferssharplyfromrelationaldatabasemanagementsystemsCassandrafirststartedasanincubationprojectatApacheinJanuaryofShortlythereafter,thecommitters,ledbyApacheCassandraProjectChairJonathanEllis,releasedversionofCassandra,andhavesteadilymademinorreleasessincethattimeThoughasofthiswritingithasnotyetreachedarelease,CassandraisbeingusedinproductionbysomeofthebiggestpropertiesontheWeb,includingFacebook,Twitter,Cisco,Rackspace,Digg,Cloudkick,Reddit,andmoreCassandrahasbecomesopopularbecauseofitsoutstandingtechnicalfeaturesItisdurable,seamlesslyscalable,andtuneablyconsistentItperformsblazinglyfastwrites,canstorehundredsofterabytesofdata,andisdecentralizedandsymmetricalsothere’snosinglepointoffailureItishighlyavailableandoffersaschemafreedatamodelIsThisBookforYouThisbookisintendedforavarietyofaudiencesItshouldbeusefultoyouifyouare:•Adeveloperworkingwithlargescale,highvolumewebsites,suchasWebsocialapplications•Anapplicationarchitectordataarchitectwhoneedstounderstandtheavailableoptionsforhighperformance,decentralized,elasticdatastores•Adatabaseadministratorordatabasedevelopercurrentlyworkingwithstandardrelationaldatabasesystemswhoneedstounderstandhowtoimplementafaulttolerant,eventuallyconsistentdatastorexvii•Amanagerwhowantstounderstandtheadvantages(anddisadvantages)ofCassandraandrelatedcolumnardatabasestohelpmakedecisionsabouttechnologystrategy•Astudent,analyst,orresearcherwhoisdesigningaprojectrelatedtoCassandraorothernonrelationaldatastoreoptionsThisbookisatechnicalguideInmanyways,CassandrarepresentsanewwayofthinkingaboutdataManydeveloperswhogainedtheirprofessionalchopsinthelast–yearshavebecomewellversedinthinkingaboutdatainpurelyrelationalorobjectorientedtermsCassandra’sdatamodelisverydifferentandcanbedifficulttowrapyourmindaroundatfirst,especiallyforthoseofuswithentrenchedideasaboutwhatadatabaseis(andshouldbe)UsingCassandradoesnotmeanthatyouhavetobeaJavadeveloperHowever,CassandraiswritteninJava,soifyou’regoingtodiveintothesourcecode,asolidunderstandingofJavaiscrucialAlthoughit’snotstrictlynecessarytoknowJava,itcanhelpyoutobetterunderstandexceptions,howtobuildthesourcecode,andhowtousesomeofthepopularclientsManyoftheexamplesinthisbookareinJavaButbecauseoftheinterfaceusedtoaccessCassandra,youcanuseCassandrafromawidevarietyoflanguages,includingC#,Scala,Python,andRubyFinally,itisassumedthatyouhaveagoodunderstandingofhowtheWebworks,canuseanintegrateddevelopmentenvironment(IDE),andaresomewhatfamiliarwiththetypicalconcernsofdatadrivenapplicationsYoumightbeawellseasoneddeveloperoradministratorbutstill,onoccasion,encountertoolsusedintheCassandraworldthatyou’renotfamiliarwithForexample,ApacheIvyisusedtobuildCassandra,andapopularclient(Hector)isavailableviaGitIncaseswhereIspeculatethatyou’llneedtodoalittlesetupofyourowninordertoworkwiththeexamples,ItrytosupportthatWhat’sinThisBookThisbookisdesignedwiththechaptersacting,toareasonableextent,asstandaloneguidesThisisimportantforabookonCassandra,whichhasavarietyofaudiencesandischangingrapidlyToborrowfromthesoftwareworld,Iwantedthebooktobe“modular”sortofIfyou’renewtoCassandra,itmakessensetoreadthebookinorderifyou’vepassedtheintroductorystages,youwillstillfindvalueinlaterchapters,whichyoucanreadasstandaloneguidesHereishowthebookisorganized:Chapter,IntroducingCassandraThischapterintroducesCassandraanddiscusseswhat’sexcitinganddifferentaboutit,whoisusingit,andwhatitsadvantagesareChapter,InstallingCassandraThischapterwalksyouthroughinstallingCassandraonavarietyofplatformsxviii|PrefaceChapter,TheCassandraDataModelHerewelookatCassandra’sdatamodeltounderstandwhatcolumns,supercolumns,androwsareSpecialcareistakentobridgethegapbetweentherelationaldatabaseworldandCassandra’sworldChapter,SampleApplicationThischapterpresentsacompleteworkingapplicationthattranslatesfromarelationalmodelinawellunderstooddomaintoCassandra’sdatamodelChapter,TheCassandraArchitectureThischapterhelpsyouunderstandwhathappensduringreadandwriteoperationsandhowthedatabaseaccomplishessomeofitsnotableaspects,suchasdurabilityandhighavailabilityWegounderthehoodtounderstandsomeofthemorecomplexinnerworkings,suchasthegossipprotocol,hintedhandoffs,readrepairs,Merkletrees,andmoreChapter,ConfiguringCassandraThischaptershowsyouhowtospecifypartitioners,replicaplacementstrategies,andsnitchesWesetupaclusterandseetheimplicationsofdifferentconfigurationchoicesChapter,ReadingandWritingDataThisisthemomentwe’vebeenwaitingforWepresentanoverviewofwhat’sdifferentaboutCassandra’smodelforqueryingandupdatingdata,andthengettoworkusingtheAPIChapter,ClientsThereareavarietyofclientsthatthirdpartydevelopershavecreatedformanydifferentlanguages,includingJava,C#,Ruby,andPython,inordertoabstractCassandra’slowerlevelAPIWehelpyouunderstandthislandscapesoyoucanchooseonethat’srightforyouChapter,MonitoringOnceyourclusterisupandrunning,you’llwanttomonitoritsusage,memorypatterns,andthreadpatterns,andunderstanditsgeneralactivityCassandrahasarichJavaManagementExtensions(JMX)interfacebakedin,whichweputtousetomonitoralloftheseandmoreChapter,MaintenanceTheongoingmaintenanceofaCassandraclusterismadesomewhateasierbysometoolsthatshipwiththeserverWeseehowtodecommissionanode,loadbalancethecluster,getstatistics,andperformotherroutineoperationaltasksChapter,PerformanceTuningOneofCassandra’smostnotablefeaturesisitsspeedit’sveryfastButthereareanumberofthings,includingmemorysettings,datastorage,hardwarechoices,caching,andbuffersizes,thatyoucantunetosqueezeoutevenmoreperformancePreface|xixChapter,IntegratingHadoopInthischapter,writtenbyJeremyHanna,weputCassandrainalargercontextandseehowtointegrateitwiththepopularimplementationofGoogle’sMapReducealgorithm,HadoopAppendixManynewdatabaseshavecroppedupinresponsetotheneedtoscaleatBigDatalevels,ortotakeadvantageofa“schemafree”model,ortosupportmorerecentinitiativessuchastheSemanticWebHerewecontextualizeCassandraagainstavarietyofthemorepopularnonrelationaldatabases,examiningdocumentorienteddatabases,distributedhashtables,andgraphdatabases,tobetterunderstandCassandra’sofferingsGlossaryItcanbedifficulttounderstandsomethingthat’sreallynew,andCassandrahasmanytermsthatmightbeunfamiliartodevelopersorDBAscomingfromtherelationalapplicationdevelopmentworld,soI’veinclud

类似资料

编辑推荐

全国统一市政工程预算定额_第五册_给水工程.pdf

医家秘奥.pdf

空调节能运行管理制度.doc

消防安全.ppt

高等无机化学.pdf

职业精品

精彩专题

上传我的资料

精选资料

热门资料排行换一换

  • 中国近世文化史_陈安仁_商务印书…

  • 中国近代文化史(焦润明).pdf

  • speech+and+langu…

  • 元代科举制的文化阐释.pdf

  • OReilly[1].Natur…

  • 红枣酒发酵工艺研究.pdf

  • 《卜筮正宗》全书——免费下载_完…

  • PIC单片机入门与实战.pdf

  • 变态心理学 - 钱铭怡.pdf

  • 资料评价:

    / 330
    所需积分:1 立即下载

    意见
    反馈

    返回
    顶部